Open Source • Apache-2.0 • Fork of EdgeLinkd

The Rust-powered
flow automation runtime

A Node-RED compatible runtime written in Rust. Run flows built from core Node-RED nodes with a small memory footprint, as a single binary plus the editor files.

terminal
$tar xzf rust-red-*-linux-x86_64.tar.gz && cd rust-red-*-linux-x86_64
$./rust-red run flows.json
Editor: http://127.0.0.1:1888 (default bind address)
$_
0MB Idle RAM, default build, Linux x64
0MB Binary, default build
0x Less RAM than Node-RED in one Modbus to PostgreSQL test
0+ Built-in node types

See it in action

RustRED running a Modbus-to-PostgreSQL flow with live memory and CPU monitoring.

What is RustRED?

RustRED is an open-source flow runtime written in Rust. It reads Node-RED flow JSON files and executes them on an async engine built on Tokio.

Flows exported from Node-RED import and run, without Node.js. That covers the core nodes, the stock MQTT nodes, node-red-contrib-modbus and node-red-contrib-postgresql. Broker and database passwords come along: flows_cred.json is read in Node-RED’s own format, encrypted or plain, with the same credential secret.

RustRED is a fork of EdgeLinkd by Li Wei, licensed under Apache-2.0, and is not affiliated with the Node-RED project.

Apache-2.0 Single binary + editor files Self-Hosted
Flow JSON
RustRED Runtime
Data Out

Features

What the current release does.

Rust Runtime

Built on Tokio async I/O. No garbage collector. Only the function node runs JavaScript, through the QuickJS interpreter.

Custom Rust nodes

Add your own nodes as Rust crates under node-plugins/; they are compiled into the binary.

Small binary

17.0MB for the default feature set (about 24MB with --features full), no Node.js needed. Release archives for Linux and macOS, x86_64 and aarch64. The editor files ship in a folder next to the binary.

Node-RED Compatible

Uses the Node-RED flow format and editor. Core nodes, stock MQTT, node-red-contrib-modbus and node-red-contrib-postgresql flows import and run.

Feature Gates

Build only what you need. Protocol, database, clustering and AI support sit behind cargo feature flags.

Built-in MQTT Broker

An embedded MQTT broker node, so a small setup needs no separate broker.

Architecture

How the runtime is put together.

Tokio Async Runtime

All I/O is non-blocking via Tokio. HTTP, MQTT, Modbus, and file operations run concurrently on a multi-threaded scheduler.

Flow Engine

Parses Node-RED flow JSON and builds an execution graph. Messages flow between nodes through typed input/output ports.

Native nodes

Nodes are Rust code registered at compile time. An experimental WASM plugin host exists in the full feature set; it is not in release binaries.

Protocol Handlers

Nodes for MQTT, Modbus, OPC-UA, BACnet, PostgreSQL, TimescaleDB, MSSQL, SQLite and InfluxDB. They are feature-gated and all in the default build.

Feature Flags

Major subsystems sit behind cargo feature flags, so you can build smaller binaries for constrained devices.

Editor & Dashboard

The Node-RED editor is served by RustRED from the ui_static folder next to the binary, at http://127.0.0.1:1888 by default.

Write custom nodes in Rust

Custom nodes are Rust crates compiled into your own build of RustRED.

1

Write your node

Implement the FlowNodeBehavior trait and annotate the node with the flow_node macro.

2

Add it as a plugin crate

Put the crate in node-plugins/. The build script links every crate in that folder.

3

Build and run

cargo build --release produces a binary that includes your node.

my_node.rs Rust
use rust_red_macro::*;

// Annotate with flow_node to register
struct MyCustomNode {
    base: BaseFlowNodeState,
}

impl MyCustomNode {
    fn build(
        flow: &Flow,
        base: BaseFlowNodeState,
        config: &RedFlowNodeConfig,
    ) -> Result<Box<dyn FlowNodeBehavior>> {
        Ok(Box::new(Self { base }))
    }
}

impl FlowNodeBehavior for MyCustomNode {
    async fn run(self: Arc<Self>, stop: CancellationToken) {
        while let Ok(msg) = self.recv_msg(stop.clone()).await {
            // Process your message
        }
    }
}

Migrate from Node-RED

Flows made of core Node-RED nodes run as they are. Other nodes may need changes.

1

Export your flows

In Node-RED, select all nodes and export as JSON. Or copy your flows.json file directly.

2

Run it in RustRED

Run rust-red run flows.json. RustRED reads the same JSON format and builds the execution graph.

3

Run and verify

Open http://127.0.0.1:1888 for the editor. Stock MQTT, node-red-contrib-modbus and node-red-contrib-postgresql nodes run as exported. Copy flows.json, flows_cred.json and .config.runtime.json together, or pass the secret with --credential-secret, and the broker and database passwords are picked up. A config node that fails to load is logged and disabled, and the rest of the flow keeps running.

Quick Start

Download a release, or build from source.

terminal
$tar xzf rust-red-*-linux-x86_64.tar.gz && cd rust-red-*-linux-x86_64
$./rust-red run flows.json
Editor: http://127.0.0.1:1888 (default bind address)
$_

Download

Get the archive for your platform from GitHub Releases and check it against checksums-sha256.txt.

Or build from source

git clone --recursive https://github.com/dzulfikar08/rust-red, then cargo build --release. Needs Rust and Node.js. cargo install --git https://github.com/dzulfikar08/rust-red installs the binary only, without the editor files.

Run your flows

./rust-red run flows.json. Add --headless to run without the editor.

Open the editor

Go to http://127.0.0.1:1888. Use --bind 0.0.0.0:8080 to change the address.

Community

RustRED is open source under Apache-2.0.