In article <20030705052752.GA6107 / student.ei.uni-stuttgart.de>, Mauricio FernáÏdez wrote: > On Sat, Jul 05, 2003 at 11:02:20AM +0900, Tim Sutherland wrote: >> In article <20030703143112.GA11662 / student.ei.uni-stuttgart.de>, Mauricio >> FernáÏdez wrote: >> [...] >> > What is rjni? >> > >> > rjni exposes the Java Native Interface to Ruby. This allows the programmer >> > to instantiate Java objects, manipulate them, define Java classes, etc.. >> > from Ruby. >> [...] >> >> In a related note, I'm working on a small library to allow C# and Ruby >> to call each others' methods (and properties/fields.) It somewhat works >> now, I just need to work on some technical issues and write documentation. > > Does it work using something similar to the Java Native Interface (ie. > through a C API)? Not exactly. I wanted the library to work in both Microsoft's and Mono's implementations of dotnet. Microsoft have created an extension of C++ to work with dotnet. Mono has a C API. At initialisation time I have the C# side call a C function passing along a bunch of "delegates", which are seen as function pointers on the C side. The C code can then call these function pointers in the future. The problem is that you still have to convince a C# program to load from within a C library. I think I'm going to have to do different things for the different implementations to get this to work.