Developer

Mermaid to ASCII Art Tool Gets WebAssembly Port for Comparison

Developer Simon Willison built a Mermaid to ASCII tool using Rust code from Grok Build, then discovered a more feature-rich Go library by AlexanderGrooff. He had Claude Fable 5 compile that Go library to WebAssembly to compare the two. The Go version supports colors and offers additional padding controls.

Neura News

Neura News

Neura Market Editorial

July 17, 20262 min read
Mermaid to ASCII Art Tool Gets WebAssembly Port for Comparison

Mermaid to ASCII Art Tool Gets WebAssembly Port for Comparison

Developer Simon Willison recently created a tool that converts Mermaid diagrams into ASCII art. He based his initial version on Rust code from Grok Build. After building that tool, he learned about an older and more comprehensive Go library called AlexanderGrooff/mermaid-ascii that performs a similar function.

Willison then used Claude Fable 5 to compile the Go library to WebAssembly. This allowed him to run both tools in the browser and compare their outputs directly.

Color Support and Features

The Go-based version includes support for colors in the ASCII output. A sample diagram shows a left-to-right flowchart with four connected boxes: "Build" displayed in green text, "Test" in green, "Deploy" in yellow, and "Rollback" in red. Each box is linked by arrows.

The tool provides a control panel with several options. An unchecked checkbox labeled "ASCII only" lets users toggle between colored and plain ASCII output. Three padding controls are available: "Padding X: 5", "Padding Y: 5", and "Box padding: 1". Users can also click buttons to "Copy as text" or "Copy link to this diagram".

The rendered diagram appears on a black background at the bottom of the interface.

The #1 Newsletter in AI

Stay ahead of the AI curve

The most important updates, news, and content — delivered weekly.

No spam. Unsubscribe anytime.

Background on the Libraries

The Go library by AlexanderGrooff implements a similar pattern to the Rust code from Grok Build but offers more features. Willison's decision to compile it to WebAssembly demonstrates how developers can bring server-side libraries into the browser for client-side use.

Mermaid is a popular diagramming tool that uses text-based syntax to generate flowcharts, sequence diagrams, and other visual representations. Converting Mermaid diagrams to ASCII art allows them to be displayed in environments that do not support graphical rendering, such as terminals or plain text documents.

Availability

The tool is available for anyone to use online. Willison has shared the WebAssembly version so developers can compare the two implementations and choose the one that best fits their needs.

Related on Neura Market

More from Neura News

Industry

Power line failure reveals AI data center grid risks and solutions

A fallen power line near Washington, DC caused over 3 gigawatts of data center load to vanish from the PJM grid in seconds, spiking voltage across the region. The event, which made lights flicker from Northern Virginia to Chicago, highlights a growing problem as AI data centers become larger and more concentrated. Experts warn that without better coordination or technology like ON.Energy's battery-backed uninterruptible power supply, such disruptions will become more frequent and severe.

Jul 25·5 min read