Some of you might remember my post from last year about my open-source project, EdgeLinkd, a Rust-based Node-RED compatible run-time engine that can partially run Node-RED workflows.
Today, I'm excited to share the latest progress: EdgeLinkd now integrates the full Node-RED web UI and includes a built-in web server. This means you can open, design, and run Node-RED flows directly in your browser, all powered by a native Rust backend. No external Node-RED installation is required.
Currently, the following nodes have been fully implemented and pass all Node-RED ported unit tests:
My plan is to implement all of Node-RED's built-in nodes and port the complete Node-RED test suite. In my project, only the function node uses the QuickJS JavaScript interpreter to run user scripts inside the node, everything else is implemented purely in Rust.
There is no compatibility with third-party nodes, 3rd-party nodes need to be reimplemented in Rust too.
Sad. That rather undermines one of the key use-cases of Node-RED for me. The fact that it uses the same language as web pages - namely JavaScript (and no, not TypeScript which I intensely dislike).
Compatible with Node-RED that's how I know what is the "correct" behaviour. The function node isn't tested since I don't use Javascript code in Erlang-Red - it's all Erlang.
The testsuite relies on the unit test nodes to define tests. Those can installed in Node-RED and used there. All I did was reimplement them in Erlang and then I could run the test suite.
I test by turning low-level JS unit tests into Rust ones. For example, the object property expression parser includes all its tests directly from Node-RED:
For node "spec" tests, I'm using PyO3 to make my flow engine a Python module, allowing me to port Node-RED tests to Python. This way, I can use Pytest with its nested testing support to compare test results with Node-RED's tests.