aasvg

Crates.ioaasvg
lib.rsaasvg
version1.0.0
created_at2025-12-27 18:39:21.334436+00
updated_at2025-12-27 18:39:21.334436+00
descriptionConvert ASCII art diagrams to SVG with automatic light/dark mode support
homepagehttps://github.com/bearcove/aasvg-rs
repositoryhttps://github.com/bearcove/aasvg-rs
max_upload_size
id2007652
size417,725
Amos Wenger (fasterthanlime)

documentation

https://docs.rs/aasvg

README

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.

Commit count: 0

cargo fmt