#ascii-art #diagram #svg #graphics #ascii #markdeep

aasvg

Convert ASCII art diagrams to SVG with automatic light/dark mode support

1 stable release

1.0.0 Dec 27, 2025

#837 in Text processing

Download history 3/week @ 2025-12-24 93/week @ 2025-12-31 76/week @ 2026-01-07 66/week @ 2026-01-14 13/week @ 2026-01-21 1/week @ 2026-01-28 1/week @ 2026-02-04 4/week @ 2026-02-11 327/week @ 2026-02-18 44/week @ 2026-02-25

376 downloads per month
Used in 6 crates (2 directly)

BSD-2-Clause

200KB
4K SLoC

Rust 2.5K SLoC // 0.1% comments JavaScript 1.5K SLoC // 0.1% comments

aasvg-rs

Crates.io Documentation License

A Rust port of aasvg, which converts ASCII art diagrams into SVG.

example

CLI Usage

cargo install aasvg-cli

# Convert a file
aasvg input.txt -o output.svg

# Or use stdin/stdout
cat input.txt | aasvg > output.svg

Library Usage

use aasvg::render;

let diagram = r#"
    +-----+     +-----+
    |     |---->|     |
    +-----+     +-----+
"#;

let svg = render(diagram);

The output SVG automatically supports light and dark mode via CSS prefers-color-scheme.

Attribution

This project is a Rust port of Martin Thomson's aasvg, which itself uses the diagram rendering code from Morgan McGuire's Markdeep.

Related projects:

  • goat - A Go implementation that reimplements the Markdeep algorithm

License

BSD-2-Clause, matching the original aasvg license.

No runtime deps