Registry / utility / svg
library0.18.0rscratesunverified

The package provides an SVG composer and parser.

# Cargo.toml [dependencies] svg = "0.18.0"
INSTALL
IMPORT
SIG · SVG
S
svg
utilityrustv0.18.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Document
use svg::Document;

Create and save an SVG document with a rectangle

use svg::Document; use svg::node::element::Rectangle; fn main() { let doc = Document::new() .set("viewBox", (0, 0, 100, 100)) .add(Rectangle::new() .set("x", 10) .set("y", 10) .set("width", 80) .set("height", 80)); svg::save("output.svg", &doc).unwrap(); }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
0.18.0latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
7 hits · last 30 days
node
6
Resources
svg — cargo add svg · libregistry