🧜
frankenmermaid v0.3.0
GitHub
PURE RUST CORE · ZERO NODE.JS RUNTIME · WASM CERTIFIED

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.

$ curl -fsSL https://frankenmermaid.com/install.sh | bash
frankenmermaid engine illustration
Layout Algorithms
15
cycle-aware Sugiyama & force-directed
Determinism Parity
100%
byte-identical SHA-256 snapshots
Taxonomy Families
24/24
flowcharts, C4, gitGraph, mindmap & more
Render Backends
4
SVG, Canvas2D, Terminal, WASM
SPECIMEN_001 · LIVE ENGINE LAB

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.

fm_operating_theater
LIVE (WASM)
Sample:
source.mmd FLOWCHART
0 lines 0 B
Insert:
vector_render.svg
SVG: 0.2ms
Compiling and rendering diagram...
100%
Diagnostics:
Zero errors • Clean syntax
Parse: 0.1ms · Layout: 0.2ms · Render: 0.2ms · Total: 0.5ms
FLOWCHART Supported Flagship Topology

Incident Response Escalation

Dense operational workflow with cycle-aware routing, clear decision diamonds, and structured recovery subgraphs.

Rendering flagship SVG...
100%
Best recovery-and-operations proof. Dense but readable routing, explicit decision diamonds, and production-grade hierarchy.
✓ Deterministic ✓ Cycle-Aware ✓ Subgraphs & Clusters
GEOMETRY_DISPATCH_CORE

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 O(V log V) · Layered DAG

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.

Flowchart · State · Class
force O(N log N) · Spatial Quadtree

Barnes-Hut Force-Directed

Quadtree-accelerated N-body physical simulation with Coulomb repulsion and Hooke elasticity, stabilized by a symplectic Euler numerical integrator.

Network · Organic Topologies
grid A* Manhattan · 0 Bend

Orthogonal Grid Router

Dual-grid A* pathfinder with minimum-bend cost heuristics and channel compaction to route orthogonal connectors cleanly without node occlusion.

Block · Schematics · ER
radial Concentric · Angle Slices

Concentric Radial Embedding

Depth-based concentric ring radii allocation with logarithmic sector partitioning, preventing angular crowding on high-degree root hubs.

Mindmaps · Tree Graphs
sequence Strict Causal Matrix

Sequence Lifeline Solver

Deterministic participant column allocation with activation fragment stacking, causal message arrow routing, and multi-actor span geometry.

Sequence Diagrams · API Traces
gitgraph Topological Lanes

GitGraph Lane Allocator

Topological DAG branch reservation with compact lane compaction, branch lifespan tracking, and cubic Bézier merge route smoothing.

Git History · Version Graphs
class-uml Pin Orthogonal Router

Class UML Pin Router

Stereotype compartmentalization, member table sizing, and cardinality-aware pin assignment for generalization, composition, and aggregation edges.

Class Diagrams · Type Hierarchies
state-matrix Hierarchical Nested States

Statechart Matrix

Composite hierarchical state clustering with entry/exit pseudo-state pins, self-transition loops, and transition event label bounding.

State Diagrams · FSMs
gantt Critical Path Propagation

Gantt Critical-Path Engine

Temporal date normalization across centuries to milliseconds with automated section swimlanes, milestone pins, and critical path cascades.

Roadmaps · Release Cycles
sankey Conservation of Flow

Sankey Flow Weaver

Volume-weighted node stratification enforcing conservation of flow laws with continuous variable-width Bézier ribbon splines.

Flow Distributions · Cost Funnels
block Proportional Span Grid

Block Architecture Grid

Multi-column grid packing with fractional column spans, nested container bounds, and edge port coordinate auto-snapping.

Hardware Blocks · System Units
c4-engine Context · Container · Component

C4 Enterprise Hierarchy

System Context, Container, Component, Dynamic and Deployment layout abstraction layers with boundary grouping and protocol tags.

C4 Context · Containers · Mesh
packet Word-Aligned Bitfields

Packet Bytefield Grid

Bitfield word boundary wrapping with bit-range headers, field span computation, and hardware register layout geometry.

Network Headers · Wire Formats
quadrant-pie Trigonometric Bounding

Quadrant & Pie Arc Solver

Four-quadrant Cartesian partitioning and exact trigonometric arc sectioning with collision-free radial leader text placement.

Quadrant Charts · Pie Shares
tree Reingold-Tilford Linear

Hierarchical Tree Embedding

Linear-time contour merging and subtree centering producing aesthetic compact tree diagrams with guaranteed minimum sibling spacing.

Hierarchies · ASTs · Taxonomies
SUBSYSTEM_MAP

One IR. Every Target.

Parse once, compute deterministic geometry, and emit to SVG, Canvas2D, Terminal ANSI, or WASM from a single intermediate representation.

Mermaid Input file · stdin · string Intent-Aware Parser best-effort recovery Shared IR & Layout 15 layout algorithms fm-render-svg Vector SVG with defs & themes fm-render-canvas Hardware Canvas2D / WASM fm-render-term Unicode Box-Drawing & Braille
DIALECT_BENCHMARK_MATRIX

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
REANIMATION_PROTOCOL

Get Stitched In.

1. Rust CLI Toolchain
curl -fsSL "https://raw.githubusercontent.com/Dicklesworthstone/frankenmermaid/main/install.sh" | bash
2. Cargo Workspace Dependency
cargo add frankenmermaid-core