2 ms·
You're right, Crystal might not be the best choice but it does the job so far. Shipping compiled binaries is so sweet, having to force every user to install th
by Alifatisk 3y ago
You're right, Crystal might not be the best choice but it does the job so far.
Shipping compiled binaries is so sweet, having to force every user to install the Ruby runtime isn't fun.
Thanks for the tip, looks like mruby is even a better way to provide portable ruby scripts. I'll check it out.
> Compiled mruby is almost as fast as just writing bare C.
That's interesting!
Just tried mruby and it seems to work very well, the packages seems enough for me aswell.
https://mruby.org/libraries https://mruby.org/libraries
But how did you manage to compile the .mrb to a binary? The boilerplate on the website does not seem to work for me.
https://mruby.org/docs/articles/executing-ruby-code-with-mruby.html https://mruby.org/docs/articles/executing-ruby-code-with-mru...
- vinceguidry 3y agoYou're using the wrong option, the one you want is at the bottom, where you use the -B option to dump the bytecode into a C array, which you then wrap with a bit of boilerplate so as to compile into a standard executable. Once you understand it it should be easy enough to script.