finds.dev← search

// the find

tafia/quick-xml

★ 1,534 · Rust · MIT · updated Jun 2026

Rust high performance xml reader and writer

quick-xml is a pull-parser for XML in Rust, built around zero-copy reads and buffer reuse. It targets the performance end of the spectrum — roughly 50x faster than xml-rs — and adds optional serde support for deserializing XML directly into Rust structs. The audience is anyone parsing XML in a Rust service who doesn't want to pay xml-rs's allocation overhead.

The zero-copy design is real: `Cow`-based event payloads mean you can parse without allocating on the hot path, and the buffer-reuse API (`read_event_into`) gives you direct control over memory. The serde integration is first-class, not bolted on — attribute vs. element distinction is handled through field rename conventions (`@attr`, `$text`) rather than wrapper types. Encoding support covers a wide range of legacy charsets (GB18030, Shift_JIS, windows-125x, etc.) behind a feature flag, which matters for real-world enterprise XML. The fuzz corpus and the separate benchmark comparison suite show this is maintained by people who care about correctness, not just the happy path.

The pull-parser API is verbose and stateful — you're writing a loop with a match on event variants, which feels like reading C in Rust. There's no XPath, no streaming DOM, no way to say 'give me all elements named X' without writing the dispatch yourself. The serde deserializer has known edge cases with mixed content (elements interleaved with text) where the `$value` vs `$text` distinction trips people up, and the docs bury the explanation. Namespace handling requires switching to `NsReader`, which is a separate type rather than a configuration option on the main reader — a design decision that creates friction when you realize midway through an integration that you need it.

View on GitHub →

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →