开发者

Can ruby scripts be precompiled into a binary?

开发者 https://www.devze.com 2023-02-24 05:17 出处:网络
I\'m working on a Ruby script that will need to be deployed onto systems without a ruby interpreter.It will need to run on FreeBSD systems which uses the ELF format.

I'm working on a Ruby script that will need to be deployed onto systems without a ruby interpreter. It will need to run on FreeBSD systems which uses the ELF format.

I开发者_运维百科 know there is a ruby2exe project to compile ruby scripts to run on Windows, but is it easy or even possible to do that on other operating systems?


Have you checked whether Rubinius or JRuby would allow you to precompile your code?


Aside from bytecode that requires a VM to run, Ruby cannot be compiled. It is an interpreted langauge and as such requires an interpreter. ruby2exe packages a ruby interpreter and runtime library with your application.

0

精彩评论

暂无评论...
验证码 换一张
取 消