zstd_sys/
lib.rs

1#![allow(non_upper_case_globals)]
2#![allow(non_camel_case_types)]
3#![allow(non_snake_case)]
4#![no_std]
5//! Low-level bindings to the [zstd] library.
6//!
7//! [zstd]: https://facebook.github.io/zstd/
8
9#[cfg(target_arch = "wasm32")]
10extern crate alloc;
11
12#[cfg(target_arch = "wasm32")]
13mod wasm_shim;
14
15// If running bindgen, we'll end up with the correct bindings anyway.
16#[cfg(feature = "bindgen")]
17include!(concat!(env!("OUT_DIR"), "/bindings.rs"));
18
19// The bindings used depend on a few feature flags.
20#[cfg(all(not(feature = "experimental"), not(feature = "bindgen")))]
21include!("bindings_zstd.rs");
22
23#[cfg(all(
24    not(feature = "experimental"),
25    feature = "zdict_builder",
26    not(feature = "bindgen")
27))]
28include!("bindings_zdict.rs");
29
30#[cfg(all(feature = "experimental", not(feature = "bindgen")))]
31include!("bindings_zstd_experimental.rs");
32
33#[cfg(all(
34    feature = "experimental",
35    feature = "zdict_builder",
36    not(feature = "bindgen")
37))]
38include!("bindings_zdict_experimental.rs");
39
40#[cfg(all(
41    feature = "seekable",
42    not(feature = "bindgen")
43))]
44include!("bindings_zstd_seekable.rs");