7 releases (4 breaking)

0.5.0 Jun 7, 2024
0.4.0 Oct 25, 2023
0.3.2 Sep 15, 2023
0.3.1 Mar 22, 2023
0.1.0 Feb 27, 2023

#1013 in Parser implementations

Download history 40/week @ 2024-03-13 12/week @ 2024-03-20 10/week @ 2024-03-27 13/week @ 2024-04-03 66/week @ 2024-04-10 133/week @ 2024-04-17 106/week @ 2024-04-24 73/week @ 2024-05-01 100/week @ 2024-05-08 86/week @ 2024-05-15 133/week @ 2024-05-22 85/week @ 2024-05-29 261/week @ 2024-06-05 82/week @ 2024-06-12 68/week @ 2024-06-19 63/week @ 2024-06-26

490 downloads per month
Used in 2 crates

Apache-2.0 OR MIT

64KB
2K SLoC

Cover logo

instant-xml: more rigorously mapping XML to Rust types

Documentation Crates.io Build status License: MIT License: Apache 2.0

instant-xml is a serde-like library providing traits and procedural macros to help map XML to Rust types. While serde is great for formats like JSON, the underlying structure it provides is not a great fit for XML, limiting serde-based tools like quick-xml. instant-xml more rigorously maps the XML data model (including namespaces) to Rust types while providing a serde-like interface.

Features

  • Familiar serde-like interface
  • Full support for XML namespaces
  • Avoids copying deserialized data where possible
  • Minimum supported Rust version is 1.58

Limitations

instant-xml is still early in its lifecycle. While it works well for our use cases, it might not work well for you, and several more semver-incompatible releases should be expected to flesh out the core trait APIs as we throw more test cases at it. There's also currently not that much documentation.

We'd love to hear your feedback!

Thanks

Thanks to @rsdy and @choinskib for their work on this library, and thanks (of course) to @dtolnay for creating serde.

Dependencies

~0.5–1.2MB
~26K SLoC