8 releases

new 0.4.2 Apr 2, 2024
0.4.1 Mar 18, 2024
0.4.0 Oct 25, 2023
0.3.2 Sep 15, 2023
0.1.0 Feb 27, 2023

#1089 in Procedural macros

Download history 14/week @ 2023-12-15 1/week @ 2023-12-29 27/week @ 2024-01-05 15/week @ 2024-01-12 2/week @ 2024-01-19 1/week @ 2024-02-02 20/week @ 2024-02-09 35/week @ 2024-02-16 44/week @ 2024-02-23 46/week @ 2024-03-01 34/week @ 2024-03-08 143/week @ 2024-03-15 51/week @ 2024-03-22 248/week @ 2024-03-29

482 downloads per month
Used in 2 crates (via instant-xml)

Apache-2.0 OR MIT

87KB
2.5K 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.4–0.8MB
~20K SLoC