11 releases

new 0.5.2 Dec 20, 2024
0.5.1 Oct 23, 2024
0.5.0 Jun 7, 2024
0.4.1 Mar 18, 2024
0.3.1 Mar 22, 2023

#1183 in Procedural macros

Download history 51/week @ 2024-08-29 6/week @ 2024-09-05 3/week @ 2024-09-12 18/week @ 2024-09-19 20/week @ 2024-09-26 41/week @ 2024-10-03 57/week @ 2024-10-10 297/week @ 2024-10-17 168/week @ 2024-10-24 57/week @ 2024-10-31 15/week @ 2024-11-07 93/week @ 2024-11-14 111/week @ 2024-11-21 121/week @ 2024-11-28 236/week @ 2024-12-05 353/week @ 2024-12-12

863 downloads per month
Used in 3 crates (via instant-xml)

Apache-2.0 OR MIT

90KB
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.

This library is used in production at Instant Domain Search.

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

~260–710KB
~17K SLoC