docs.rs failed to build vexy-vsvg-2.2.0
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
The engine room of Vexy.
Programmatic access to the Vexy SVG optimizer. Parse, traverse, optimize, and stringify SVGs with extreme prejudice against whitespace and redundancy.
Core Concepts
- Parsing: Uses
roxmltreeandquick-xmlto build a mutable AST. - Plugins: 50+ optimization strategies that operate on the AST.
- Optimization: A pipeline that applies enabled plugins in order (multipass supported).
- Stringification: Serializes the AST back to standard SVG XML.
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
ast: The Document Object Model (DOM) for SVG.optimizer: The core optimization loop.parser: From string to AST.stringifier: From AST to string.plugin_registry: Management of available plugins.