GVariant-rs
A pure-rust implementation of the GVariant serialisation format intended for fast reading of in-memory buffers.
let string = gv!.from_bytes;
assert_eq!;
Documentation
Module documentation with examples.
Usage
Add this to your Cargo.toml
:
[]
= "0.5"
Example: read an ostree dirtree file and print the listing:
use ;
use Error;
Status
- Support for all GVariant types is implemented
- Behaviour is identical to GLib's implementation for all data in "normal form". This has been confirmed with fuzz testing. There are some differences for data not in normal form. See https://gitlab.gnome.org/GNOME/glib/-/issues/2121 for more information.
TODO
- Publish version 1.0
- Benchmarking and performance improvements
- Ensure that deserialisation of non-normal structures matches GLib in all cases.
Hacking
Build with:
cargo build
Run tests:
cargo test
Clippy linting:
cargo clippy
Fuzz testing:
RUSTFLAGS='-C overflow-checks=on' ASAN_OPTIONS="detect_leaks=0" cargo +nightly fuzz run --release fuzz_target_1
License
This project is licensed under either of
- Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.