Cargo Features

libdeflater has no features set by default.

[dependencies]
libdeflater = { version = "1.22.0", features = ["use_rust_alloc", "freestanding", "dynamic"] }
use_rust_alloc freestanding?

Makes libdeflate use Rust's allocator instead of the libc one.
This is useful when Rust is preconfigured to a custom global allocator (e.g. pool-based, or a tracking one, or something else entirely).

freestanding = use_rust_alloc

Builds libdeflate in a freestanding mode (no reliance on libc).
This is useful for targets that don't have a C stdlib (e.g. wasm32-unknown-unknown).

Enables freestanding of libdeflate-sys

dynamic

Link to system/external libdeflate library when available, instead of building it from source.

Enables dynamic of libdeflate-sys