I've tried running rbx compile
but I am not quite sure what to do with the output. I would like to run it with lli, but I get the following error.
$ lli hello.rbc
lli: hello.rbc:2:1: error: expected '=' here
18185007515559028006
^
您不会使用 lli 运行 Rubinius 字节编译代码,因为 .rbc 文件不是 LLVM 可执行文件。相反,您使用特殊的 Rubinius 方法调用来运行它,该方法调用处理 Rubinius 虚拟机的预编译字节码。例如:
rbx -I. -e "Rubinius::CodeLoader.require_compiled 'hello'"
有关更多详细信息,请参阅在没有 Ruby 的情况下运行 Ruby。