Skip to content

oldrev/edgelinkd

Repository files navigation

EdgeLinkd: Node-RED Reimplemented in Rust

Build Status GitHub Release GitHub Downloads

Node-RED Rust Backend

English | 简中

Overview

EdgeLinkd is a high-performance, memory-efficient Node-RED compatible runtime engine built from the ground up in Rust, now featuring an integrated web UI for complete standalone operation.

Why EdgeLinkd?

  • 10x less memory usage than Node-RED (only 10% of Node-RED's memory footprint)
  • Native performance with Rust's zero-cost abstractions
  • Integrated web interface - full Node-RED UI built-in for flow design and management
  • Standalone operation - no external Node-RED installation required
  • Drop-in replacement - use your existing flows.json files
  • Perfect for edge devices with limited resources
  • Node-RED compatibility - design, deploy, and run flows all in one application

EdgeLinkd now includes the complete Node-RED web editor, allowing you to design flows directly in the browser while executing them with native Rust performance. You can also run it headless for production deployments on resource-constrained devices.

Only the function node uses the lightweight QuickJS JS interpreter to run JavaScript code; all other functionalities are implemented in native Rust code for maximum performance.

A Short Demo

short-demo.mp4

Use Cases

  • Flow Development: Design and test flows directly in the integrated web editor
  • Rapid Prototyping: Full Node-RED UI for quick flow development and iteration
  • IoT Edge Gateways: Process sensor data with minimal resource usage
  • Industrial Automation: Run control flows on embedded controllers with web-based monitoring
  • Home Automation: Deploy smart home logic on Raspberry Pi with remote web access
  • Development & Production: Use web UI for development, headless mode for production deployment
  • Cloud-to-Edge Migration: Move Node-RED flows from cloud to edge with unified interface
  • Container Deployments: Lightweight containers for edge computing with optional web UI
  • Remote Management: Access and modify flows remotely through the web interface

Quick Start

0. Clone the Repository

Clone the repository with submodules:

git clone --recursive https://github.com/oldrev/edgelinkd.git

Or if you've already cloned without submodules:

git clone https://github.com/oldrev/edgelinkd.git
cd edgelinkd
git submodule update --init --recursive

1. Build

Prerequisites: Rust 1.80 or later

cargo build --release

Windows users: Ensure patch.exe is in your PATH (included with Git) and install Visual Studio for MSVC.

Supported platforms:

  • x86_64-pc-windows-msvc
  • x86_64-pc-windows-gnu
  • x86_64-unknown-linux-gnu
  • aarch64-unknown-linux-gnu
  • armv7-unknown-linux-gnueabihf
  • armv7-unknown-linux-gnueabi

2. Run

Start EdgeLinkd with integrated web UI (recommended):

cargo run --release --
# or after build
./target/release/edgelinkd

By default, your browser will open the Node-RED frontend at http://127.0.0.1:1888.

Main command-line options:

  • [FLOWS_PATH]: Optional, specify the flow file (default: ~/.edgelinkd/flows.json)
  • --headless: Headless mode (no Web UI, suitable for production)
  • --bind <BIND>: Custom web server bind address (default: 127.0.0.1:1888)
  • -u, --user-dir <USER_DIR>: Specify user directory (default: ~/.edgelink)
  • See more options with --help

Examples:

# Run in headless mode
./target/release/edgelinkd run --headless

# Specify flow file and port
./target/release/edgelinkd run ./myflows.json --bind 0.0.0.0:8080

All data and configuration are stored in the ~/.edgelink directory by default.

Use --help to see all commands and options:

./target/release/edgelinkd --help
./target/release/edgelinkd run --help

Run Unit Tests

cargo test --all

Run Integration Tests

Running integration tests requires first installing Python 3.9+ and the corresponding Pytest dependencies:

pip install -r ./tests/requirements.txt

Then execute the following command:

set PYO3_PYTHON=YOUR_PYTHON_EXECUTABLE_PATH # Windows only
cargo build --all
py.test

Configuration

EdgeLinkd can be configured through command-line arguments and configuration files.

Web UI Configuration

Command-line options:

  • --bind <address>: Set the web server binding address (default: 127.0.0.1:1888)
  • --headless: Run without the web UI for production deployments
  • --user-dir <path>: Specify custom user directory for flows and settings

Configuration file: You can also configure the web UI through the configuration file (edgelinkd.toml):

[ui-host]
host = "0.0.0.0"
port = 1888

Project Status

Alpha Stage: The project is currently in the alpha stage and cannot guarantee stable operation.

New: Integrated Web UI: EdgeLinkd now includes a complete Node-RED web interface for flow design and management. The web UI is fully compatible with Node-RED's editor and provides the same user experience while running on the high-performance Rust runtime.

Web UI Features:

  • ✅ Complete Node-RED editor interface
  • ✅ Flow design and editing
  • ✅ Node palette with all supported nodes
  • ✅ Deploy flows directly from the browser
  • ✅ Real-time flow execution monitoring
  • ✅ Debug panel integration
  • ✅ Settings and configuration management
  • ✅ Import/Export flows functionality

The heavy check mark ( ✔️ ) below indicates that this feature has passed the integration test ported from Node-RED.

Node-RED Features Roadmap:

  • ✔️ Flow
  • ✔️ Sub-flow
  • Group
  • ✔️ Environment Variables
  • Context
    • Memory storage
    • Local file-system storage
  • RED.util (WIP)
    • RED.util.cloneMessage()
    • RED.util.generateId()
  • Plug-in subsystem1
  • JSONata

The Current Status of Nodes:

Refer REDNODES-SPECS-DIFF.md to view the details of the currently implemented nodes that comply with the Node-RED specification tests.

  • Core nodes:
    • Common nodes:
      • ✔️ Console-JSON (For integration tests)
      • ✔️ Inject
      • Debug (WIP)
      • ✔️ Complete
      • ✔️ Catch
      • ✔️ Status
      • ✔️ Link In
      • ✔️ Link Call
      • ✔️ Link Out
      • ✔️ Comment (Ignored automatically)
      • GlobalConfig (WIP)
      • ✔️ Unknown
      • ✔️ Junction
    • Function nodes:
      • Function (WIP)
        • Basic functions
        • node object (WIP)
        • context object
        • flow object
        • global object
        • RED.util object
        • env object
      • Switch (WIP)
      • ✔️ Change
      • ✔️ Range
      • ✔️ Template
      • Delay
      • Trigger
      • Exec
      • ✔️ Filter (RBE)
    • Network nodes:
      • MQTT In
      • MQTT Out
      • MQTT Broker
      • HTTP In
      • HTTP Out
      • HTTP Request
      • WebSocket Listener
      • WebSocket Client
      • WebSocket In
      • WebSocket Out
      • TCP In
      • TCP Out
      • TCP Get
      • UDP In
      • ✔️ UDP Out
        • Unicast
        • Multicast
      • TLS (WIP)
      • HTTP Proxy (WIP)
    • Sqeuence nodes:
      • Split
      • Join
      • Sort
      • Batch
    • Parse nodes:
      • CSV
      • HTML
      • ✔️ JSON
      • ✔️ XML
      • YAML
    • Storage
      • File
      • File In
      • Watch

Roadmap

Check out our milestones to get a glimpse of the upcoming features and milestones.

Contribution

Alt

We welcome contributions! Whether it's:

  • Bug reports and feature requests
  • Documentation improvements
  • Code contributions and new node implementations
  • Testing on different platforms

Note: Please make meaningful contributions, or watch and learn. Simply modifying the README or making non-substantive changes will be considered malicious behavior.

Please read CONTRIBUTING.md for details.

Support the Project

If EdgeLinkd saves you memory and improves your edge deployments, consider supporting development:

Buy Me a Coffee at ko-fi.com

Support via PayPal.me

Known Issues

Please refer to ISSUES.md for a list of known issues and workarounds.

Feedback and Support

We welcome your feedback! If you encounter any issues or have suggestions, please open an issue.

License

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.

Footnotes

  1. Rust's Tokio async functions cannot call into dynamic libraries, so currently, we can only use statically linked plugins. I will evaluate the possibility of adding plugins based on WebAssembly (WASM) or JavaScript (JS) in the future.

Sponsor this project

Packages

No packages published

Languages