I actually wonder why the port takes so long, as for nodejs, the process is rather easy.
- You add a new handler to require.extensions with a custom function.
- The custom function takes the .j file, parses it, and the generated javascript is then eval()’d and the module.exports / exports is returned.
So, the runtime only needs to add stuff like objj_msgSend and such to the GLOBAL object, so the code can be evaluated correctly. And…uh, thats it, actualy o.o’
Maybe a good resource is to download nodejs-v0.10.x source and open …/js/module.js, as it very nicely details the require api for the ‚.js‘ extension.
I would do it myself, but the runtime looks like it has been obfuscated - so I cant do a derp x)
Kind regards, Ingwie