The Node.js Runtime in shadow, which supports NPM packages partially for embeddable platform.
Currently supports the following platform:
- OSX
- Linux
This project is another runtime for your Node.js app, which is to be used in low memory devices. It's inspired and forked from the original awesome project Samsung/iotjs.
To get started with shadow-node, you should follow the build step on a Linux or OSX machine. And this project will not be supported on Windows unfortunately.
Memory usage and Binary footprint are measured at here with real target daily.
$ git clone https://github.com/Rokid/ShadowNode.git
$ cd ShadowNode
$ tools/build.py
$ tools/build.py --install # install the binary/library/headers to prefix, default /usr/local
To get supported options, run:
$ tools/build.py --help
$ tools/build.py --tests
For Additional information see Getting Started.
The ShadowNode's purpose is not going to run the absolute same code both on the Node.js and ShadowNode, within embeddable devices might be severe and less memory requirement, you should write your apps in an light thinking. However we are hoping to share the same community for developers as possible, and the following are the status:
- Assert
- Buffer
- Child Process
- Crypto
- DNS
- Events
- File System
- HTTP
- Module
- Net
- OS
- Process
- Stream
- Timers
- TLS
- UDP/Datagram
- Zlib
In desktop and embedable ecosystem, the service via DBus
is quite normal, in shadow-node, the DBus
will be the built-in module. For detailed API, see DBUS API.
The MQTT
protocol is used for communication between IoT devices, then ShadowNode would support
this protocol natively, and we keep the API consistent with the pop library MQTT.js. See
MQTT API for details.
The WebSocket
is the popular protocol in IoT environment as well, and also supported by ShadowNode
natively. See WebSocket API.
For hardware geek, this project benefits from the upstream IoT.js, which has supported the following hardware interfaces, you are able to port [shadow-node][] to your platform(s) and start hacking with JavaScript:
ShadowNode is Open Source software under the Apache 2.0 license. Complete license and copyright information can be found within the code.