Cargo Features

[dependencies]
zstd-sys = { version = "2.0.9+zstd.1.5.5", default-features = false, features = ["debug", "experimental", "legacy", "non-cargo", "pkg-config", "std", "zstdmt", "thin", "no_asm", "zdict_builder", "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
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
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.68

bindgen:

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