svg-path
is a simple, dependencyless library for composing SVG path data strings, intended for use in Rust-based frontend frameworks and tools that output SVG. It consists of a single type, Path
, which supports a simple and type-safe builder-like syntax for appending path commands, and implements Display
for conversion into the SVG syntax.
Path
also includes helper methods for producing certain common path shapes that can be nontrivial to express directly (currently just Path::partial_circle
).
Considerations for the future of this library, depending on demand, include:
- Support for concatenation of
Path
objects - Support for passing data types other than
f32
for command values - First-class treatment of commands with a
PathCommand
enum of some sort. - Support for parsing
Path
objects from strings (likely behind a feature, since this would probably mean introducing dependencies.)
svgtypes
, a library with parsers and composers for many SVG data types (but not the XML syntax itself).svg_minimal
, a similarly minimal path-focused SVG librarysvg
, a full SVG composer and parsernsvg
, a Rust wrapper for the NanoSVG C library.rsvg
, Rust bindings to thersvg
libraryresvg
, a Rust SVG rendererlyon_path
, a library with an SVG-inspired path data structure