English | 简体中文
EdgeLink is a Node-RED compatible run-time engine implemented in Rust†.
This program is designed to execute flows.json
file that have been designed and exported/deployed using Node-RED, without any editor or other HTML/Web-related functionalities. The purpose of its development is to deploy tested Node-RED flows to devices with limited memory for execution.
Only the "function" node will use the lightweight QuickJS JS interpreter to run their code; all other functionalities are implemented in native Rust code.
- High Performance: Leverage the advantages of the Rust language for excellent performance.
- Low Memory Footprint: Reduce memory usage compared to the NodeJS backend. Tests indicate that, for running a same simple workflow, the physical memory usage of EdgeLink is only 10% of that of Node-RED.
- Scalability: Retain the extensibility of Node-RED, supporting custom nodes.
- Easy Migration: Easily replace the existing Node-RED backend with minimal modifications.
For the purpose of testing this project, we first need to install Node-RED as our flow designer and generate the flows.json
file. Please refer to the Node-RED documentation for its installation and usage.
After completing the flow design in Node-RED, please ensure that you click the big red "Deploy" button to generate the flows.json
file. By default, this file is located in ~/.node-red/flows.json
. Be mindful not to use Node-RED features that are not yet implemented in this project.
cargo build -r
Note for Windows Users: Windows users should ensure that the
patch.exe
program is available in the%PATH%
environment variable to successfully compile the project usingrquickjs
. This utility is required to apply patches to the QuickJS library for Windows compatibility. If Git is already installed, it will includepatch.exe
.
cargo run -r
Or:
./target/release/edgelinkd
By default, EdgeLink will read ~/.node-red/flows.json
and execute it.
cargo test --all
Running integration tests requires first installing Python 3.9+ and the corresponding Pytest dependencies:
pip install -U -r ./tests/requirements.txt
Then execute the following command:
cargo build -r
python -B -m pytest tests
Adjust various settings in the configuration file, such as port number, flows.json
path, etc. Refer to CONFIG.md for more information.
Prototype Stage: The project is currently in the prototype stage and cannot guarantee stable operation.
- Flow
- Sub-flow
- Group
- Environment Variables (WIP)
- Context
- RED.util (WIP)
-
RED.util.cloneMessage()
-
RED.util.generateId()
-
- Plug-in subsystem (WIP)
- Core nodes:
- Common nodes:
- Console-JSON (For integration tests)
- Inject
- Debug (WIP)
- Complete
- Catch
- Status
- Link In
- Link Call
- Static Target
- Dynamic Target
- Link Out
- Comment (Ignore automatically)
- GlobalConfig (WIP)
- Unknown
- Junction
- Function nodes:
- Function (WIP)
- Basic functions
-
node
object -
context
object -
flow
object -
global
object -
RED
object -
env
object
- Switch
- Change
- Range
- Template
- Delay
- Trigger
- Exec
- Filter
- Function (WIP)
- Network nodes:
- MQTT In
- MQTT Out
- HTTP In
- HTTP Response
- HTTP Request
- WebSocket In
- WebSocket Out
- TCP In
- TCP Out
- TCP Request
- UDP In
- UDP Out
- Unicast
- Multicast (WIP)
- TLS
- HTTP Proxy
- Sqeuence nodes:
- Split
- Join
- Sort
- Batch
- Parse nodes:
- CSV
- HTML
- JSON
- XML
- YAML
- Storage
- Write File
- Read File
- Watch
- Common nodes:
Check out our roadmap to get a glimpse of the upcoming features and milestones.
Contributions are always welcome! Please read CONTRIBUTING.md for more details.
If you want to support the development of this project, you could consider buying me a beer.
Please refer to ISSUES.md for a list of known issues and workarounds.
We welcome your feedback! If you encounter any issues or have suggestions, please open an issue.
E-mail: oldrev(at)gmail.com
This project is licensed under the Apache 2.0 License - see the LICENSE file for more details.
Copyright © Li Wei and other contributors. All rights reserved.