13 unstable releases (4 breaking)
Uses new Rust 2024
| 0.5.1 | Feb 20, 2026 |
|---|---|
| 0.5.0 | Jan 28, 2026 |
| 0.4.1 | Jan 21, 2026 |
| 0.3.2 | Sep 18, 2025 |
| 0.1.0 | Apr 23, 2025 |
#1234 in Encoding
23 downloads per month
32KB
936 lines
nanoxml
A truly minimal XML (de)serializer for Rust.
Features
- serialization and deserialization of very basic XML (only attributes and elements are supported)
derivefor (de)serialization of structs and enums (optional)- tiny codebase (~400 LoC + optional ~900 LoC for derive)
- no runtime dependencies
no_std- optional
allocsupport - optional
defmtsupport - optional
heaplesssupport - UTF-8 only
Derive Attributes
#[nanoxml(attr)]: (de)serialize as attribute (i.e.key="value")#[nanoxml(text)]: (de)serialize as text (i.e. content between<tag></tag>without an additional sub-element for the field)#[nanoxml(rename = "xmlname")]: usexmlnameas the attribute key or tag name in the XML#[nanoxml(seq)]: must be specified for "sequence" fields (e.g.Vecor array)#[nanoxml(skip_ser)]: skip this field when serializing to XML#[nanoxml(default_de)]: when this field is not present when deserializing the XML, fall back to theDefault::default()value#[nanoxml(default_de = "func")]: when this field is not present when deserializing the XML, callfuncto get a fallback value
Dependencies
~0–295KB