zlacker

Show HN: Mmdr – 1000x faster Mermaid rendering in pure Rust (no browser)

submitted by jeremy+(OP) on 2026-02-04 14:00:04 | 32 points 4 comments
[view article] [source] [links] [go to bottom]

I was building a Rust-based agentic coding TUI and needed to render Mermaid diagrams. Noticed the official mermaid-cli spawns a full browser instance (Puppeteer/Chrome) just to render diagrams. Decided to fix this.

mmdr is a native Rust renderer. No browser, no Node.js.

  mermaid-cli:  ~3000ms per diagram
  mmdr:         ~3ms per diagram
Supports 13 diagram types: flowchart, sequence, class, state, ER, pie, gantt, timeline, journey, mindmap, git graph, XY chart, and quadrant.

replies(2): >>jackot+pR1 >>planka+QR2
1. jackot+pR1[view] [source] 2026-02-04 22:51:04
>>jeremy+(OP)
Does it make sense to create a Wasm build of this for the browser? Or is the speedup mainly due to the browser spawning step rather than execution/rendering itself?
replies(1): >>dzogch+UZ2
2. planka+QR2[view] [source] 2026-02-05 07:49:58
>>jeremy+(OP)
Could this be used as a drop-in replacement for mermaid-cli or is the CLI different?
◧◩
3. dzogch+UZ2[view] [source] [discussion] 2026-02-05 08:54:39
>>jackot+pR1
I reckon the main speed up is from not having to launch a browser.
replies(1): >>danhau+F93
◧◩◪
4. danhau+F93[view] [source] [discussion] 2026-02-05 10:15:16
>>dzogch+UZ2
Mermaid can also be used inside the browser directly, I believe. The WASM compiled Rust implementation could still outperform it.
[go to top]