22 releases (14 breaking)

0.15.0 Apr 3, 2024
0.14.0 Feb 5, 2024
0.13.0 Dec 3, 2023
0.12.0 Oct 1, 2023
0.1.1 May 23, 2018

#120 in Parser implementations

Download history 13630/week @ 2023-12-23 18349/week @ 2023-12-30 22748/week @ 2024-01-06 28202/week @ 2024-01-13 31402/week @ 2024-01-20 31956/week @ 2024-01-27 30901/week @ 2024-02-03 30501/week @ 2024-02-10 36086/week @ 2024-02-17 29177/week @ 2024-02-24 28866/week @ 2024-03-02 32405/week @ 2024-03-09 31478/week @ 2024-03-16 34248/week @ 2024-03-23 32329/week @ 2024-03-30 22028/week @ 2024-04-06

124,417 downloads per month
Used in 324 crates (23 directly)

MIT/Apache

190KB
4.5K SLoC

svgtypes

Build Status Crates.io Documentation Rust 1.65+

svgtypes is a collection of parsers for SVG types.

Supported SVG types

Features

  • Complete support of paths, so data like M10-20A5.5.3-4 110-.1 will be parsed correctly.
  • Implicit path commands will be automatically converted into explicit one.
  • Some SVG2 data types support.
  • Pretty fast.

Limitations

  • Accepts only normalized values, e.g. an input text should not contain   or &data;.
  • All keywords must be lowercase. Case-insensitive parsing is supported only for colors (requires allocation for named colors).
  • The <color> followed by the <icccolor> is not supported. As the <icccolor> itself.
  • System colors, like fill="AppWorkspace", are not supported. They were deprecated anyway.

Safety

  • The library should not panic. Any panic considered as a critical bug and should be reported.
  • The library forbids unsafe code.

Alternatives

None.

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Dependencies

~660KB
~14K SLoC