Reimplementing Node-RED in Rust: EdgeLinkd project update

Hello people, it's me again.

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:

  • Inject
  • Complete
  • Catch
  • Link In
  • Link Call
  • Link Out
  • Function
  • Comment (Ignored automatically)
  • Unknown
  • Junction
  • Change
  • Range
  • Template
  • Filter (RBE)
  • JSON

You can find the project here: https://github.com/oldrev/edgelinkd
It’s released under the same Apache 2.0 License as Node-RED.

Have fun.

6 Likes

Interesting, just last week I was conjecturing over rust red. That's based off my project Erlang-Red.

Of interest to you might be the visual test cases I put together to ensure that Erlang-Red works and keeps on working as I make changes.

Btw someone should keep count, that makes four: python-red, headless-red (browser only), rust red, i.e. EdgeLinkd and Erlang-Red. Anymore?

1 Like

Looks good.

What do nodes need to do in order to be usable in this?

One issue I see is that many nodes rely on native and/or 3rd-party Node.js modules and libraries - can they be used in this?

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.

Thanks.

Your visual test cases look very useful. Are they compatible with Node-RED, or are they specifically designed for your Erlang-Red?

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.

8,000,000,000,000 - 1 = 7,999,999,999,999 potential other users.

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.

1 Like

Gave you a star. Loved it. Really good job.

1 Like