[wxruby-users] Distributing Windows WxRuby apps

Alex Fenton alex at pressure.to
Mon Mar 30 09:06:20 EDT 2009


Eric Will wrote:
> How long before you figure there will be a bytecode compiler deal (a
> la kava for perl) for 1.9? I would imagine this is one of the big
> giant reasons to use 1.9.

You can already save and load compiled instructions for the Ruby 1.9 
virtual machine, using the VM::InstructionSequence class in Ruby core. 
However in the ruby distribution the method VM::InstructionSequence.load 
is disabled, but if you uncomment the relevant line (in iseq.c, near the 
end) and compile ruby, you can run ruby from saved VM instructions. I've 
tried it (to a limited extent) and it works.

The reason it's disabled is 'there is no verifier' - which I believe in 
part reflects concern about cross-version compatibility of VM 
instructions - but if you're distributing your own Ruby with your GUI 
app, this may not matter.

a


More information about the wxruby-users mailing list