The Monster Diagram Engine.
A clean-room, zero-dependency Rust diagram engine with intent-aware parsing, 15 layout algorithms, 100% deterministic geometry, and native multi-surface rendering across SVG, Canvas2D, Terminal ANSI, and WebAssembly.
The Operating Theater.
Type Mermaid with performant real-time syntax highlighting on the left. The WebAssembly engine computes deterministic layouts and renders vector SVG or Canvas2D on the right in sub-millisecond frames.
Incident Response Escalation
Dense operational workflow with cycle-aware routing, clear decision diamonds, and structured recovery subgraphs.
15 Specialized Layout Engines.
Instead of forcing every diagram into generic graphviz DOT, frankenmermaid implements 15 dedicated geometry solvers engineered for deterministic stability, zero float drift, and specialized domain aesthetics.
Sugiyama Layered DAG
Decycled feedback arc set breaking, Coffman-Graham layer width bounds, and E-graph barycenter crossing minimization for hierarchical workflows and state machines.
Barnes-Hut Force-Directed
Quadtree-accelerated N-body physical simulation with Coulomb repulsion and Hooke elasticity, stabilized by a symplectic Euler numerical integrator.
Orthogonal Grid Router
Dual-grid A* pathfinder with minimum-bend cost heuristics and channel compaction to route orthogonal connectors cleanly without node occlusion.
Concentric Radial Embedding
Depth-based concentric ring radii allocation with logarithmic sector partitioning, preventing angular crowding on high-degree root hubs.
Sequence Lifeline Solver
Deterministic participant column allocation with activation fragment stacking, causal message arrow routing, and multi-actor span geometry.
GitGraph Lane Allocator
Topological DAG branch reservation with compact lane compaction, branch lifespan tracking, and cubic Bézier merge route smoothing.
Class UML Pin Router
Stereotype compartmentalization, member table sizing, and cardinality-aware pin assignment for generalization, composition, and aggregation edges.
Statechart Matrix
Composite hierarchical state clustering with entry/exit pseudo-state pins, self-transition loops, and transition event label bounding.
Gantt Critical-Path Engine
Temporal date normalization across centuries to milliseconds with automated section swimlanes, milestone pins, and critical path cascades.
Sankey Flow Weaver
Volume-weighted node stratification enforcing conservation of flow laws with continuous variable-width Bézier ribbon splines.
Block Architecture Grid
Multi-column grid packing with fractional column spans, nested container bounds, and edge port coordinate auto-snapping.
C4 Enterprise Hierarchy
System Context, Container, Component, Dynamic and Deployment layout abstraction layers with boundary grouping and protocol tags.
Packet Bytefield Grid
Bitfield word boundary wrapping with bit-range headers, field span computation, and hardware register layout geometry.
Quadrant & Pie Arc Solver
Four-quadrant Cartesian partitioning and exact trigonometric arc sectioning with collision-free radial leader text placement.
Hierarchical Tree Embedding
Linear-time contour merging and subtree centering producing aesthetic compact tree diagrams with guaranteed minimum sibling spacing.
24 Diagram Specimens.
Every Mermaid specification and extended dialect parsed into a unified semantic IR with live vector previews rendered in your browser.
One IR. Every Target.
Parse once, compute deterministic geometry, and emit to SVG, Canvas2D, Terminal ANSI, or WASM from a single intermediate representation.
Engine Head-to-Head.
Why we rebuilt diagram rendering from bare metal: zero Node.js dependencies, 100% deterministic layout, and native multi-surface output.
| Feature / Dimension | 🧜 frankenmermaid | mermaid-js | Graphviz (DOT) | Excalidraw |
|---|---|---|---|---|
| Execution & Core Engine | ⚡ Pure Rust + WebAssembly | JavaScript / DOM / D3 | C / Native binary | React / Canvas JS |
| Render Latency (WASM / Native) | 🚀 0.1ms – 0.9ms | 120ms – 450ms | 15ms – 60ms | 8ms – 30ms |
| Determinism Guarantee | 🔒 100% Bit-Identical SHA-256 | ✗ Non-deterministic DOM jitter | ~ Near deterministic | — Interactive rough |
| Supported Render Targets | 🎯 SVG, Canvas2D, Terminal, WASM | SVG (DOM only) | SVG, PostScript, PNG | Canvas / PNG export |
| Error Recovery & Tolerance | ✓ Best-effort parse + diagnostics | ✗ Hard exception (red box) | ⚠ Syntax error exit | — |
| CLI Footprint / Prerequisites | 📦 Single standalone static binary | Node + Puppeteer + Chromium (350MB+) | C compiler / package manager | No standalone CLI |
| Terminal / ASCII Rendering | ✓ Unicode Box-Drawing & Braille | ✗ Unsupported | ✗ Unsupported | ✗ Unsupported |
Get Stitched In.
curl -fsSL "https://raw.githubusercontent.com/Dicklesworthstone/frankenmermaid/main/install.sh" | bash
cargo add frankenmermaid-core