I need something like OCaml, but that doesn't generate such a huge binary when statically linking with musl because it tries to put the entire runtime, even the unused functions, in there.
What should I try? Myrddin or something else? #asknostr
I need something like OCaml, but that doesn't generate such a huge binary when statically linking with musl because it tries to put the entire runtime, even the unused functions, in there.
What should I try? Myrddin or something else? #asknostr
Myrddin looks OK, doesn't depend on glibc, compiles static binaries out of the box, still a stripped fizzbuzz from the readme takes 181800 bytes on Linux x86_64.
Importing (just importing, not using) http and regex modules increases the (stripped) size to 356392 bytes.
So, basically, it might be easier for my usecases than OCaml, but the same problem remains. And the development is pretty much stalled. Alas.
But I might give it a try for some small project in the future.
Anything with runtime and automatic memory management will add to the size significantly.
Have you tried stripping and trying to minimise your #OCaml binary?
Heard of #ATS?
Ok, I have taken a look at ATS and suspect that it's the same as Nim in terms of using an intermediate C source. Myrddin looks more self-sufficient. But thanks, good to have another option in the arsenal.