Mininode Save

Node.js for Embedded Systems

Project README

mininode - Node.js for Embedded Systems

MIT LicensedBuild StatusFuck it! Ship it!

This is http-parser, c-ares, bearssl, libslz, and lowzip held together with duktape. The goal here is to produce an implementation of the Node.js 6.9.2 API with a full-fledged Javascript interpreter in a single binary with no runtime dependencies other than a standard C library.

This aims to implement the Node.js standard library entirely in C. Deprecated features will be removed entirely and some functionality (http2) will be included from the 13.x release series.

This is very early in development. Any feedback is very welcome!

NOTE: PRE-ALPHA QUALITY!

I've posted this for early feedback and to receive input during the development process, but this is not close to being usable. I intend to borrow a lot of code from [Dukluv][9] and track the upstream Duktape development process, but any thoughts (in, say, the form of issues) would be appreciated!

Supported Modules Matrix

module name mininode docs upstream docs status notes
assert nodejs v6.9.2 INCOMPLETE
buffer nodejs v6.9.2 COMPLETE Duktape provides a compatible implementation.
child_process nodejs v6.9.2 INCOMPLETE
cluster nodejs v6.9.2 INCOMPLETE
console nodejs v6.9.2 INCOMPLETE
crypto nodejs v6.9.2 INCOMPLETE
debugger nodejs v6.9.2 INCOMPLETE
dgram nodejs v6.9.2 INCOMPLETE
dns nodejs v6.9.2 INCOMPLETE
domain nodejs v6.9.2 DEPRECATED
errors nodejs v6.9.2 INCOMPLETE
events nodejs v6.9.2 INCOMPLETE
fs nodejs v6.9.2 INCOMPLETE
http nodejs v6.9.2 INCOMPLETE
http2 nodejs v13.x INCOMPLETE
https nodejs v6.9.2 INCOMPLETE
net nodejs v6.9.2 INCOMPLETE
os nodejs v6.9.2 COMPLETE
path nodejs v6.9.2 INCOMPLETE
process nodejs v6.9.2 INCOMPLETE
punycode nodejs v6.9.2 INCOMPLETE
querystring nodejs v6.9.2 INCOMPLETE
readline nodejs v6.9.2 INCOMPLETE
repl nodejs v6.9.2 COMPLETE Don't expect a feature-rich REPL! I may add a few more, but it will remain light.
stream nodejs v6.9.2 INCOMPLETE
string_decoder nodejs v6.9.2 INCOMPLETE
timers nodejs v6.9.2 INCOMPLETE
tls nodejs v6.9.2 INCOMPLETE
tty nodejs v6.9.2 INCOMPLETE
url nodejs v6.9.2 INCOMPLETE
util nodejs v6.9.2 INCOMPLETE
v8 nodejs v6.9.2 INCOMPLETE
vm nodejs v6.9.2 INCOMPLETE
zlib nodejs v6.9.2 INCOMPLETE

Notes on Compatibility

While this aspires to be compatible with the Node 6.9.2 API, it does not aspire to be tit-for-tat compatible with every nuance of the V8 Node.js runtime. Since the standard library is written in C (as opposed to Javascript), it may not be possible to (for example) access the prototypes of built-in modules unless this has been explicitly implemented. Remote debugging in Chrome is challenging, but I don't want to completely rule out the possibility.

So, while I'd like for the overall development experience to be very similar, code which is heavily dependent on the features and internal behavior of the mainline Node.js runtime will likely need to be ported.

Build Instructions

This uses GNU make and it is currently being developed on (and for) Linux, other systems are not yet supported but this should also work on OSX, Illumos/Solaris and *BSD (possibly with minimal porting effort).

Either gcc or clang should work, just set the CC environment variable.

From a Linux system:

git clone https://github.com/mininode/mininode.git
cd mininode
git submodule init
git submodule update
make && sudo make install

Alternatively, if you wish to customize your build you may do:

make menuconfig

The same kconfig system you might remember from the Linux kernel is used to build mininode, so you can save configurations and point at them with like so:

KCONFIG_CONFIG=/path/to/saved/.config OBJDIR=/tmp/obj make

The OBJDIR variable allows out of tree builds, so you can easily have various different builds for different configurations and architectures.

For use on embedded systems, musl libc and Linux are recommended (in general).

What's the point?

This is intended aid in rapid development of small embedded clients, with realistic requirements of ~100mhz and 8MB RAM although less might be workable. Since this will likely never approach the performance of V8 as a javascript interpreter, you will almost certainly want to continue using mainstream Node.js for servers unless you are prepared to write the bulk of your hot path in C using duktape.

Signed Tags

After mininode 1.0, tags will be signed using a key corresponding to this one:

-----BEGIN PGP PUBLIC KEY BLOCK-----

mQENBFjpWSYBCADU8KvSfJiVr03h7T07TFJFN2ZK7AAnqVFLqjePjVIy4SiHXI2k
HVKPE6tQky6bsW6R+Cu1PxsssDEY/Ed/EvkXovEYxL0KM4ChKt5qDA/smGqtANwN
BHrzIdgddzFO1HjvgUB/RYej38/41vaDM3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JGCwAFEOvhB5iXwC7yt0ubz
pkBv9rVac60d2CVisDsAEQEAAYkBPAQYAQgAJhYhBCk2zBOl3lP08S3Aw+OWGErE
WH9dBQJY6VkmAhsMBQkDwmcAAAoJEOOWGErEWH9dRlAIAL0SgCgkg0oybHHYmMkx
BcrSBKJ3i4gmgk40Dn16eNuN7SinigQpW22CVOwSIqT42c4a4XafsEyhY/nRiKrl
p1c5wMEaDSiCJj7UqW01hDuhzs/pAPZsDunfbjfqMiTkBO9AWq+QnBuqSSBRy8Qr
mxB5qZAqTZZbRijFYgKsBo//kSV0m/yqUzV/OGUsVY0EktQJyZP2+HAN7R+OjAcb
1SjYi8UlvkUA+btMS7fMFSDmtxo9c7c60YACNeO4ZBqIDNBBA/kUCSpOhLBkriZx
q+shygUZGmyocV9+n8Rt7mTdE5KjK8asJEHqJy1BRukmI5BxFBIkgbcaUkZAU+1Q
d+E=
=jgJd
-----END PGP PUBLIC KEY BLOCK-----
Open Source Agenda is not affiliated with "Mininode" Project. README Source: mininode/mininode
Stars
51
Open Issues
1
Last Commit
4 years ago
Repository

Open Source Agenda Badge

Open Source Agenda Rating