This is currently in an incomplete state, and not yet viable for serious use.
Specifically the goals are:
- to be drop-in compatible with node.js 0.11.11
- to be very lightweight
- to provide the most minimal binding that is possible (via libuv)
- NOT to archieve Node.js performance (this is meant as a client-side, not a server-side application)
- NOT to be backwards-compatible (newest iOS/OS X required)
How it compares to existing approaches
MacGap / Phonegap-mac
As such, it can be combined with the Node.app project, to get the best of both worlds, Node.js compatibility as well as OS X specific desktop functions.
Apache Cordova / PhoneGap
Apache Cordova is available for multiple platforms, but when focussing on the iOS platform, it too can be combined with the Node.app project to get the best of both worlds.
What's working right now
How to compile
You most likely want to use the stable brach, by
git checkout stable.
You then need to fetch the nodejs submodule. Do so by:
git submodule init
git submodule update
Afterwards, just open
Nodelike.xcodeproj, build the framework and you're all set!
How to use
NLContext#attachToContext:(JSContext *). This exposes the Node APIs to the global object of the context.
Afterwards, you need to run the event loop via
In the end, when you executed all scripts you wanted to, you can simulate the shutdown of the Node.js process via
For more information, take a look at the wiki.