Node.js for Android committed on github

Yesterday, I posted my initial port of Node.js for Android on github (https://github.com/ldesegur/nodejs-android). This is a very early work, as my main job has kept me away from making more progress. However, results are showing some promises. I am sharing this code so other people are able to help.

So far, v8 and libev seem to work. libeio needs some more work on the I/O side. I’ve wrapped all the missing bionic kernel calls, so they are emulated correctly on the thwarted libc available on Android. They appear with ANDROID defines. Maybe node.js main could take those back into their repo? I have yet to modify the makefiles, conforming to ndk-buiid, to generate JS2CC files, so for now, the translated js to native are committed in the repo. Running basic eval commands with node.js returns results in the log files.

Why am I working on this and how can it benefit other developers?

I believe there is a tremendous benefit to have Node.js running client side. In my personal quest to find a way to write JS code performing well on mobile devices, offering native functionalities and being modular so it’s updatable using AJAX, I couldn’t find a better solution than what node.js provides to server side developers. Node.js gives very simple and elegant way to write JavaScript code in multiple modules with ‘export’ and ‘require’ declarations. The ‘process’ mechanism lets JavaScript access bindings and native code. V8 offers native-style performance and the V8 bridge is simple and will allow other libraries to be developed as local and remote modules.

My goal, as I move forward with this project, is to offer all functionalities that a modern browser DOM would supply (including xmlhttprequest and webgl), to the client JavaScript executables.

2 thoughts on “Node.js for Android committed on github

Leave a comment