Low level Rust FFI bindings for lzham codec generated using bindgen
.
You must have cmake
and a C++ compiler to build this crate, as the lzham library is built along with the crate. The crate does not search for a prebuilt library.
Add the following to your Cargo.toml
:
[dependencies]
lzham-sys = "0.1.1"
lzham-sys
supports both static and dynamic linking. To link statically, you can either set LIBLZHAM_STATIC
or LZHAM_STATIC
environment variables to true, or use the static
feature.
To link dynamically, use the dynamic
feature.
If you don't set any environment variables or use any features, the build will be the expected default library linking method based on OS or target. For Windows, macOS and Linux with musl, it will be static
. For Linux without musl, it will be dynamic
.
Note that environment variables take precedence over features. In case of any ambiguity, it uses the default linking method.
The crate has the following three features:
generate_bindings
: Generates the bindings again (usesbindgen
)static
: Links to the library staticallydynamic
: Links to the library dynamically
lzham_sys is available under the MIT license. See LICENSE for more details.