crossflow_diagram_editor

Crates.iocrossflow_diagram_editor
lib.rscrossflow_diagram_editor
version0.0.6
created_at2025-10-21 05:52:58.789696+00
updated_at2026-01-21 02:29:55.411836+00
descriptionFrontend for crossflow diagrams
homepage
repositoryhttps://github.com/open-rmf/crossflow
max_upload_size
id1893312
size2,641,252
Grey (mxgrey)

documentation

README

crossflow_diagram_editor

This contains a SPA React web app to create and edit a crossflow diagram and an axum router to serve it.

Embedding the Diagram Editor into a crossflow app

crossflow_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)
}

Standalone Diagram Editor API server

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.

WebAssembly Local Backend

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.

Local development server

Normally the web stack is not required by using this crate as a dependency, but it is required when developing the frontend.

Requirements:

  • nodejs
  • pnpm

Setup

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

Live Demo

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
Commit count: 344

cargo fmt