weggli-native is a "native" C API for Google's weggli.
It exposes a subset of weggli's public Rust API to C and C++ consumers.
See the demo for a small example of use.
$ git clone https://github.com/trailofbits/weggli-native
$ cd weggli-native
$ # add --release for a release build
$ cargo build
You can also use cbindgen
to generate
weggli-native's header file:
$ cbindgen --config cbindgen.toml --crate weggli-native --output weggli.h