The Node.js runtime in shadow, enables N-API and vast Node.js packages on edge devices.
To get started with ShadowNode, you could download prebuilt binaries on Release Page for following targets:
- Linux x64
- macOS x64
Memory usage and binary footprint are measured at here with real target daily.
Fetch source code
$ git clone https://github.com/Rokid/ShadowNode.git $ cd ShadowNode
$ npm run build
Get available build options
$ tools/build.py --help
$ tools/build.py --install
$ npm test
For additional information see Getting Started.
Compared with Node.js
ShadowNode is not designed to be ran identical code that ran on Node.js. While edge environments are experiencing limited resources on runtime, the packages to be ran on ShadowNode shall be rewritten in a resource compact way. However for the very initial thought of sharing the Node.js vast module ecosystem, we would like make ShadowNode compatible with Node.js with our efforts.
- C/C++ Addon API
- Child Process
- File System
MQTT protocol is commonly used for communication between IoT devices, ShadowNode supports
the protocol natively, and keeps the API consistent with the popular library MQTT.js. See
MQTT API for details.