Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[suggestion] Standalone release #6

Open
0atman opened this issue Aug 28, 2020 · 2 comments
Open

[suggestion] Standalone release #6

0atman opened this issue Aug 28, 2020 · 2 comments

Comments

@0atman
Copy link

0atman commented Aug 28, 2020

Does it make sense to build a standalone finkel binary, statically-linked and ready for distribution?

Sure we'd not have stack available to us, but I have a few machines that stack is way overkill for, but I'd still love to play with finkel.

Thanks!

@8c6794b6
Copy link
Member

8c6794b6 commented Sep 3, 2020

It shall be easier to run the finkel executable by distributing statically-linked one, but to compile Finkel source codes, various resources other than the executable itself are required. Without those, what the executable can do is not more than showing help messages.

Roughly speaking, the resources required by ghc to compile Haskell source codes are required by the finkel executable to compile Finkel source codes. For instance, compiling a simple Finkel program:

(defn main (putStrLn "hello"))

will require interface file and object code of the module containing the putStrLn function, which is System.IO module from the base package.

Bundling all the required resources (interface files, object codes, runtime system ... etc) for compilation as a standalone staticlly-linked binary is not yet done in ghc. Perhaps that is too much work for the finkel project to do.

In summary, if statically-linked ghc executable makes sense, I think making statically linked finkel executable will make sense. At the moment, I cannot find much usecases for such option. Please feel free to let me know if ther are any.

By the way, if stack is too heavy, installing ghc and cabal-installwith ghcup or with your favorite package manager might help the situation. Then the finkel executable could be built and invoked with:

$ git clone https://github.com/finkel-lang/finkel
$ cd finkel && cabal v2-build finkel
$ cabal v2-exec -- finkel help

@0atman
Copy link
Author

0atman commented Sep 6, 2020

ah, I see! Thank you for the explanation. I'll try the cabal method! :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants