1 unstable release
0.1.1 | Oct 30, 2020 |
---|---|
0.1.0 |
|
#803 in Compression
21 downloads per month
Used in 3 crates
(via lzham)
1MB
25K
SLoC
lzham-sys
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.
Usage
Add the following to your Cargo.toml
:
[dependencies]
lzham-sys = "0.1.1"
Linking
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.
Features
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
License
lzham_sys is available under the MIT license. See LICENSE for more details.
No runtime deps
~0–455KB