Installation
Prerequisites
You need the Rust toolchain with WebAssembly support:
# Install Rustcurl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
# Add WASM targetrustup target add wasm32-unknown-unknown
# Install build toolscargo install wasm-pack justBuild
# Build WASM frontend + start serverjust dev
# Or separately:just build-wasm # Build WASMjust serve # Start server (auto-finds port if 3000 is taken)Development with Auto-Reload
just watch # cargo-watch restarts server on changesjust watch-all # Also rebuilds WASM on web crate changesNPM Packages
If you’re integrating via JavaScript/TypeScript, install the packages you need:
npm install @auser/workflow-graph-web # WASM + Canvas renderer (includes .wasm binary)npm install @auser/workflow-graph-react # React component (peer dep: @auser/workflow-graph-web)npm install @auser/workflow-graph-client # TypeScript REST API clientThe @auser/workflow-graph-web package bundles the compiled WASM binary in its wasm/ directory. You need to serve this file and tell the loader where to find it:
import { setWasmUrl } from '@auser/workflow-graph-web';
// Point to where you serve the .wasm file (e.g., public/ directory)setWasmUrl('/workflow_graph_web_bg.wasm');Copy the WASM file to your static assets:
cp node_modules/@auser/workflow-graph-web/wasm/workflow_graph_web_bg.wasm public/What’s Included
| Package | Size | Features |
|---|---|---|
@auser/workflow-graph-web | ~100KB gzipped | Renderer, theming (dark/light/high-contrast), minimap, i18n, touch support, a11y |
@auser/workflow-graph-react | ~3KB | React wrapper with ref API, loading skeleton, SSR guard, error boundary |
@auser/workflow-graph-client | ~2KB | Typed REST client with WorkflowApiError, log streaming |
All packages ship with TypeScript declarations (strict: true) and ES module output.