[Ironruby-core] Initializing external Ruby libraries

Wayne Kelly w.kelly at qut.edu.au
Wed Feb 13 18:58:56 EST 2008

For Ruby libraries such as sockets, openssl etc (ie not built-in classes or modules), I assume we will implement/port them using say C# to produce a managed dll (eg socket.dll). Client programs will then require 'socket', and IronRuby will load socket.dll rather than socket.so

I note IronRuby already has the ability to load managed dlls such as mscorlib - but that appears to simply load the assembly and then presumably uses .NET reflection to expose the .NET classes as Ruby classes. But for managed dll such as socket.dll that has been specifically engineered as an IronRuby extension dll, I image the loading process would be a little different? CRuby, for example exposes an Init_Foo function which explicitly calls define_class, define_method etc to explicitly register each of the Ruby classes implemented by that library (equivalent to what IronRuby does in LibrariesInitializer.LoadModules).

Will there be a similar convention used by IronRuby? Possibly in static class constructors?

Cheers, Wayne.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/ironruby-core/attachments/20080214/6ee8eaaf/attachment.html 

More information about the Ironruby-core mailing list