aasvg-rs
A Rust port of aasvg, which converts ASCII art diagrams into SVG.
CLI Usage
# Convert a file
# Or use stdin/stdout
|
Library Usage
use render;
let diagram = r#"
+-----+ +-----+
| |---->| |
+-----+ +-----+
"#;
let svg = render;
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.