/ShadowNode

Use Node.js in your embeddable devices :)

Primary LanguageJavaScriptOtherNOASSERTION

ShadowNode

The Node.js Runtime in shadow, which supports NPM packages partially for embeddable platform.

Build Status License FOSSA Status

Currently supports the following platform:

  • OSX
  • Linux

Quick Start

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.

Getting Source Code

$ git clone https://github.com/Rokid/ShadowNode.git
$ cd ShadowNode

Build

$ npm run build

To get supported options, run:

$ tools/build.py --help

Install

$ tools/build.py --install

Test

$ npm test

For Additional information see Getting Started.

What's different with Node.js

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:

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:

Documentation

License

ShadowNode is Open Source software under the Apache 2.0 license. Complete license and copyright information can be found within the code.