| Crates.io | crossflow_diagram_editor |
| lib.rs | crossflow_diagram_editor |
| version | 0.0.6 |
| created_at | 2025-10-21 05:52:58.789696+00 |
| updated_at | 2026-01-21 02:29:55.411836+00 |
| description | Frontend for crossflow diagrams |
| homepage | |
| repository | https://github.com/open-rmf/crossflow |
| max_upload_size | |
| id | 1893312 |
| size | 2,641,252 |

This contains a SPA React web app to create and edit a crossflow diagram and an axum router to serve it.
crossflow appcrossflow_diagram_editor contains an embedded version of the frontend. An axum router is provided
that can be used to serve the embedded frontend.
cargo add crossflow_diagram_editor
use crossflow_diagram_editor::basic_executor::{self, DiagramElementRegistry, Error};
fn main() -> Result<(), Box<dyn Error>> {
let mut registry = DiagramElementRegistry::new();
// register node builders, section builders etc.
basic_executor::run(registry)
}
The embedded frontend can be disabled:
[dependencies]
crossflow_diagram_editor = { version = "*", default-features = false, features = ["router"] }
This will cause the router to serve only the rest API.
See the calculator demo for more examples.
If the bevy app can be compiled into a WebAssembly blob, the diagram editor can use it in place of an API server.
See crossflow_diagram_editor_wasm for more info.
Normally the web stack is not required by using this crate as a dependency, but it is required when developing the frontend.
Requirements:
Install pnpm and nodejs:
curl -fsSL https://get.pnpm.io/install.sh | bash -
pnpm env use --global lts
Install the dependencies:
pnpm install
First start the dev backend server:
pnpm dev:backend
then in another terminal, start the frontend dev server:
pnpm dev
When there are breaking changes in crossflow, the typescript definitions need to be regenerated:
pnpm generate-types
We host a live demo of the diagram editor at this link. The diagram editor and workflow executor both run in the client's web browser. The node catalog includes simple math operations.
[!NOTE] Repo maintainers that want to update the web-hosted demo should run these commands:
cargo install wasm-pack
pnpm install
pnpm deploy-ghpages