| Crates.io | aasvg |
| lib.rs | aasvg |
| version | 1.0.0 |
| created_at | 2025-12-27 18:39:21.334436+00 |
| updated_at | 2025-12-27 18:39:21.334436+00 |
| description | Convert ASCII art diagrams to SVG with automatic light/dark mode support |
| homepage | https://github.com/bearcove/aasvg-rs |
| repository | https://github.com/bearcove/aasvg-rs |
| max_upload_size | |
| id | 2007652 |
| size | 417,725 |
A Rust port of aasvg, which converts ASCII art diagrams into SVG.
cargo install aasvg-cli
# Convert a file
aasvg input.txt -o output.svg
# Or use stdin/stdout
cat input.txt | aasvg > output.svg
use aasvg::render;
let diagram = r#"
+-----+ +-----+
| |---->| |
+-----+ +-----+
"#;
let svg = render(diagram);
The output SVG automatically supports light and dark mode via CSS prefers-color-scheme.
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:
BSD-2-Clause, matching the original aasvg license.