This project is a work-in-progress conversion from unsafe Rust transpiled directly from libexpat into safe, idiomatic Rust code. The initial transpilation and refactoring was done using C2Rust.
Do not use this in production (yet!), but help refactoring and rewriting is always welcome.
Requirements: Linux host with
rustup installed. To run tests, you'll also need to install the requirements of libexpat (autoconf 2.58 or newer, make, and a recent C toolchain).
$ git clone --recurse-submodules https://github.com/immunant/rexpat $ cd rexpat && cargo build
$ cargo test
Download the W2C XML test suite to
/tmp/libexpat/xml-test-suite and run
To perform additional testing.
NOTE: Requires that you build
$REXPAT_ROOT/upstream/expat/tests/benchmark/benchmark first. See steps and requirements here. You must also have
python3 (Python 3.6 or later) in your path.
- Provide an ABI-compatible drop-in replacement for
- Avoid memory-corruption vulnerabilities via Rust's safety guarantees.
- Perform on par with the
libexpatin time and space.
rexpat is free software licensed similarly to
libexpat. You may copy, distribute, and modify it under the terms of the License contained in the file COPYING distributed with this package. This license is the same as the MIT/X Consortium license.