lzham-sys

Crates.iolzham-sys
lib.rslzham-sys
version0.1.1
sourcesrc
created_at2020-10-29 21:50:56.206144
updated_at2020-10-30 00:41:13.690416
descriptionLow level FFI-bindings for the lzham codec.
homepage
repositoryhttps://github.com/AriusX7/lzham-sys
max_upload_size
id306801
size1,199,590
Arius (AriusX7)

documentation

README

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 (uses bindgen)
  • static: Links to the library statically
  • dynamic: Links to the library dynamically

License

lzham_sys is available under the MIT license. See LICENSE for more details.

Commit count: 35

cargo fmt