[Ironruby-core] Is it possible to generate DLLs?

David Lake lists at ruby-forum.com
Sat Jan 23 07:02:51 EST 2010

Bassel Samman wrote:
> Actually, never mind.  Looks like precompilation is not supported yet. 
> Googling shows they may work on it post 1.0.  On the other hand, one of 
> the developers came up with a workaround that will work for us since our 
> needs are minimal.  We are just going to zip and encrypt for now and we 
> can unzip and run in memory from a small C# app.  Also, if someone 
> really needs a DLL you can use rubydotnet.

I've found it easiest to put Ruby scripts into embedded resources in the 
DLL then read them out from there. You can optionally encrypt them as 
part of the build process and decrypt them before running them so that 
they cannot be spied upon. I use this system a lot (with Ruby.Net, but 
it will work fine with IronRuby too).

As an added aid during development, the code that I use to get a 
resource 'foo.rb' from the DLL will do a quick check on disk at location 
<dll_location>\<dll_name> for a plain-text version of 'foo.rb'. If it 
finds one, it loads it in preference. This way you don't need to rebuild 
the DLL during development - only when ready to release.

Posted via http://www.ruby-forum.com/.

More information about the Ironruby-core mailing list