Cargo Features

[dependencies]
zstd-sys = { version = "2.0.13+zstd.1.5.6", default-features = false, features = ["debug", "experimental", "legacy", "non-cargo", "pkg-config", "std", "zstdmt", "thin", "no_asm", "zdict_builder", "no_wasm_shim", "fat-lto", "thin-lto", "bindgen"] }
default = legacy, zdict_builder

These default features are set whenever zstd-sys is added without default-features = false somewhere in the dependency tree.

debug

Enable zstd debug logs

experimental

Expose experimental ZSTD API

legacy default

Enable legacy ZSTD support (for versions < zstd-0.8)

non-cargo

Silence cargo-specific build flags

pkg-config

Use pkg-config to build the zstd C library.

std

Deprecated: we never use types from std.

zstdmt

Enable multi-thread support (with pthread)

thin

Optimize binary by size

no_asm

Disable ASM files (only on amd64 for decompression)

zdict_builder default

Enable dictionary building (dictionary _using_ is always supported).

no_wasm_shim

Disable wasm shims (in case your wasm toolchain includes a C stdlib).

fat-lto

These two are for cross-language LTO. Will only work if clang is used to build the C library. Enable fat-lto, will override thin-lto if specified

thin-lto

Enable thin-lto, will fallback to fat-lto if not supported

Features from optional dependencies

bindgen build implicit feature

Enables bindgen ^0.69

bindgen:

Automatically generates Rust FFI bindings to C and C++ libraries