As a project to practice learning Rust, I’ve created (or maybe you could say "borrowed heavily from") an open-source run-time engine prototype that’s compatible with Node-RED in Rust. It can directly run flows.json workflow files generated by Node-RED.
Hi & welcome to this forum!
In general, this looks like a nice project.
Unfortunately, most of the files you reference in your README are unaccessible, e.g. CONFIG.md.
Hi, I'm sorry for the inconvenience. This project is still in its very early stages of development. The documentation is mostly placeholders at the moment. Right now, there's not much to configure. You can just use the command line argument -h to see the available options.
How does this work exactly ? I mean in terms of the nodes that are being used within flows, is there some kind JS/JIT compiler at work ? And once the flow is running, do you have access to the editor using the same 'engine' or does it only execute the flows as is ?
This program is designed to execute flows.json files 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.
In other words, I need to use Rust to reimplement all the nodes used in the flows.json.
Only the "function" node will use the lightweight QuickJS JS interpreter to run their code; all other functionalities are implemented in native Rust code.
Love to see this go somewhere, I've been thinking about doing the same (using Python) but always stopped because the JS/NodeJS dependencies always meant it would be of limited use, i.e. function nodes would always be a pain or extra installed nodes.
Your approach of defining the "base" nodes (i.e. switch, change, inject - i assume) is probably the right way to start.