AI/TLDR

Simon Willison · 2026-07-16 · notable

Simon Willison — grok-mermaid ports Grok CLI's Rust renderer to the browser

Simon Willison found a self-contained Mermaid-to-Unicode renderer in xAI's newly open-sourced Grok Build repo and used Claude Fable 5 to compile the Rust code to WebAssembly, shipping it as a browser tool.

Screenshot of the grok-mermaid browser tool with a Mermaid flowchart rendered as Unicode box art

A Rust Mermaid renderer buried in Grok Build's source, ported to WebAssembly and turned into a shareable browser tool.

What is it?

grok-mermaid is a browser tool that renders Mermaid diagram syntax as terminal-style Unicode box art. Simon Willison spotted the underlying renderer inside `xai-grok-markdown/src/mermaid.rs` when xAI open-sourced Grok Build under Apache-2.0, then wrapped it for the web.

How does it work?

The Rust source ships with no external dependencies, so it compiles cleanly to WebAssembly. Simon fed the file and a target prompt to Claude Code for web (Fable 5), which produced the wasm build plus a page with a textarea for input, a width slider, and share links. Everything runs client-side.

Why does it matter?

grok-mermaid is a small but telling artifact of open-sourcing frontier tooling: within a day of the Grok Build release, a useful piece was extracted, ported to a new runtime, and shipped as its own product. It also validates that Fable 5 can drive a non-trivial Rust-to-WASM port end-to-end from a single prompt.

Who is it for?

developers who want diagram-friendly output in terminals or docs

Try it

https://tools.simonwillison.net/grok-mermaid

Sources · 3 outlets

Tags

  • article
  • showcase
  • tool
  • simon-willison
  • webassembly
  • rust
  • mermaid
  • grok
  • claude-fable-5

← All releases · Learn AI