docs.rs failed to build vexy-vsvg-2.2.5
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build:
vexy-vsvg-0.1.0
Vexy Vsvg VSVG
SVG optimization for Rust. Parse → optimize → stringify.
Feed it bloated SVGs from Illustrator, Figma, or Inkscape; get back lean, identical-looking output. Same plugin names and config format as SVGO, but compiled to native code.
How it works
SVG text → Parser (quick-xml) → Document AST → 52 plugins → Stringifier → SVG text
- Parsing: Turns XML into a mutable [
Document] tree with [Element] nodes. - Plugins: 52 optimization passes — each implements the [
Plugin] trait and walks the AST via the Visitor pattern. - Optimization: Runs enabled plugins in order, with optional multipass until the output stabilizes.
- Stringification: Converts the AST back to XML, minified or pretty-printed.
Usage
Add this to your Cargo.toml:
[]
= "2.1.1"
Optimize an SVG string with default settings:
use ;
Configure specific plugins:
use ;
let mut config = default;
config.plugins.push;
let svg = r#"<svg viewBox="0 0 10 10" width="10" height="10">...</svg>"#;
let result = optimize.unwrap;
Modules
| Module | Role |
|---|---|
[ast] |
The mutable document tree — [Document], [Element], [Node] |
[parser] |
SVG text → AST (uses quick-xml under the hood) |
[optimizer] |
The pipeline: parse → apply plugins → stringify |
[stringifier] |
AST → SVG text (minified or pretty-printed) |
[plugin_registry] |
Registry of named plugin factories |
[visitor] |
Tree-walking framework for plugins |
[css] |
CSS variable resolution for var() references |
[collections] |
SVG element/attribute metadata tables |
[utils] |
Shared helpers for colors, numbers, paths, selectors |
[error] |
The unified [VexyError] type |
[features] |
Compile-time feature flags and runtime capability queries |