JXCore, a fork of Node.js, garnered attention for the intriguing way it boosts Node performance by adding a novel multithreading mechanism. Now the project has a new trick up its sleeve in its latest beta release: the ability to compile a stand-alone executable out of a Node.js project.
JXCore 2.30 can package Node.js applications, along with all their dependent modules, into a single deliverable that has no external dependencies. A non-Node user can take the resulting binary and run it without having to install anything else.
The packaging process is platform-dependent; a Windows user can only package Windows executables, for example. That said, JXCore is apparently planning to monetize the need for cross-compilation for other platforms. In a blog post describing the new feature, the company states, "We offer a paid cloud binary for the companies/individuals to compile their solution on a single developer machine for multiple operating systems/architectures at once."
Packaging a Node.js application has typically been done by bundling a copy of the Node.js executable with the application files, in much the same way a Python application can be bundled with a copy of its own interpreter. In a similar vein, Roger Wang's node-webkit project can be used to package a Node app for desktop use.
JXCore's approach is intended to produce packages that more self-contained, easier to deliver, and more difficult to tamper with. Earlier versions of JXCore allowed an app's files to be packaged into a single .jx file for protection, but still needed the Node.js binary to run it.
The biggest objection people may have to JXCore has been raised before: It's currently a closed source project. However, the official JXcore site notes, "JXCore will be open sourced prior to release candidate," so those previously unwilling to commit themselves to it may feel a little less uneasy now. What'll be truly interesting after that happens is to see if, or how, JXcore's changes are recommited back into Node.js itself.
This story, "JXCore's new trick: Convert Node.js projects into self-running apps" was originally published by InfoWorld.