weggli-native
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.
Building
$ 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