The Information Machine

Mermaid to Unicode box art (grok-mermaid)

Simon Willison · Simon Willison · 2026-07-16

Simon Willison compiled a Rust-based Mermaid diagram renderer found inside xAI's open-sourced Grok CLI codebase into a browser-runnable WebAssembly tool.

Open original ↗

Appears in

Extraction

Topics: webassemblymermaid-diagramsgrok-clirustdeveloper-tools

Claims

  • The Grok CLI codebase contains a self-contained Rust terminal renderer for Mermaid diagrams that uses Unicode box-drawing characters.
  • Willison compiled the Rust renderer to WebAssembly to make it runnable in a browser.
  • The resulting tool was built using Claude Code for web (Fable 5).

Key quotes

xai-grok-markdown/src/mermaid.rs is a 'self-contained terminal renderer for Mermaid diagrams' written in Rust.
I figured it would be fun to try that out in a browser via WebAssembly.