Expand description
libxml-rs: Custodial native-Rust reimplementation of libxml2 and libxslt
This is not an XML crate. This is not an XSLT crate. This is not a wrapper. This is a forensic reconstruction of the observable behavior of the libxml2 + libxslt ecosystem across its historical lifetime, implemented in native Rust.
§Architecture
The crate is organized into semantic modules corresponding to real ownership boundaries:
abi- C ABI compatibility layer: types, structs, constants, exports, callbacks, allocator, ownership, versioningxml- libxml2 implementation: parser, SAX, tree, entities, namespaces, DTD, validation, reader, writer, encoding, I/O, catalog, URI, XPath, XPointer, XInclude, RELAX NG, schemas, Schematron, C14N, HTML, regex, automata, dictionary, hash, list, debug, globals, threads, errors, memoryxslt- libxslt implementation: stylesheet, compiler, transform, templates, patterns, variables, parameters, keys, attributes, namespace_alias, whitespace, sorting, numbering, documents, imports, extensions, serialization, security, errorsexslt- EXSLT modules: common, math, sets, strings, dynamic, functions, datescompatibility- Historical profiles, quirks, platform-specific behaviorbin- CLI tools: xmllint, xmlcatalog, xsltproc
§Safety
This crate uses unsafe only where fundamentally required for C ABI export, raw-pointer
compatibility, foreign allocator interoperability, public C structure layout, callbacks,
variadic compatibility, OS interfaces, and dynamic-loader interaction.
Every unsafe block documents:
- What must be true
- Who establishes it
- How long it remains true
- Which oracle/parity court exercises the assumption
- What would constitute violation
Modules§
- abi
- C ABI compatibility layer (§4, §14).
- compatibility
- Compatibility profiles, historical behavior, and platform quirks (§68, §69).
- exslt
- EXSLT implementation — native Rust (§35).
- xml
- libxml2 implementation — native Rust (§1, §3, §31).
- xslt
- libxslt implementation — native Rust (§1, §3, §31–§34).
Constants§
- LIBXML_
RS_ VERSION - The full version string of the libxml-rs crate (from Cargo.toml).
- LIBXML_
RS_ VERSION_ MAJOR - Major version number of libxml-rs.
- LIBXML_
RS_ VERSION_ MICRO - Micro version (patch) number of libxml-rs.
- LIBXML_
RS_ VERSION_ MINOR - Minor version number of libxml-rs.