[Cardinal-devel] Cardinal Design Documents - Class Library
mark sparshatt
msparshatt at yahoo.co.uk
Mon Aug 9 15:45:09 EDT 2004
h1. Acessing the class library from Parrot
The current design is to rewrite the Ruby classes in IMC. This has
been reasonably successful but there are a number of problems
1 It will take a lot of work to complete
2 It'll be hard to get exactly the same as cRuby
3 If the cRuby classes change this'll have to be rewritten
The two alternative plans are
1. Use NCI to access the cRuby implementation
This would be the easiest way to access the ruby classes but there are
a few problems
1 It's not possible to compile the ruby files individually, so
the whole ruby executable will need to be included
2 Most of the functions are defined as being static. these can't be
accessed through NCI
3 Trying to call any of the ruby functions segfaults
It's possible that these problems can be fixed though.
2. Write a conversion tool to convert the cRuby code into IMC
This option would require more work up front but will make it easier
to acess the whole class library. Also it should be possible to use
the tool to help with targetting ruby to other run time enviroments.
The plan is to continue working on writing the Ruby classes in IMC as
a prototype to test the code generation against, while working on the
other two alternatives.
--
Mark Sparshatt
More information about the Cardinal-devel
mailing list