Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ partial-io = "0.5"
walkdir = "2.2"

[features]
default = ["legacy", "arrays", "zdict_builder"]
default = ["legacy", "arrays", "zdict_builder", "bindgen-runtime"]

bindgen = ["zstd-safe/bindgen"]
debug = ["zstd-safe/debug"]
Expand All @@ -49,6 +49,10 @@ zdict_builder = ["zstd-safe/zdict_builder"]
fat-lto = ["zstd-safe/fat-lto"]
thin-lto = ["zstd-safe/thin-lto"]

# bindgen non-addititive features
bindgen-runtime = ["zstd-sys/bindgen-runtime"]
bindgen-static = ["zstd-sys/bindgen-static"]

[[example]]
name = "train"
required-features = ["zdict_builder"]
2 changes: 1 addition & 1 deletion Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ This library includes a pre-generated `bindings.rs` file.
You can also generate new bindings at build-time, using the `bindgen` feature:

```
cargo build --features bindgen
cargo build --features bindgen,bindgen-runtime
```

# TODO
Expand Down
4 changes: 4 additions & 0 deletions zstd-safe/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,9 @@ seekable = ["zstd-sys/seekable"]
fat-lto = ["zstd-sys/fat-lto"]
thin-lto = ["zstd-sys/thin-lto"]

# bindgen non-addititive features
bindgen-runtime = ["zstd-sys/bindgen-runtime"]
bindgen-static = ["zstd-sys/bindgen-static"]

[lints.rust]
non_upper_case_globals = "allow"
7 changes: 5 additions & 2 deletions zstd-safe/zstd-sys/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ doctest = false # Documentation is for C code, good luck testing that.
optional = true
version = "0.72"
default-features = false
features = ["runtime"]

[build-dependencies.pkg-config]
version = "0.3.28"
Expand All @@ -65,7 +64,7 @@ version = "1.0.45"
features = ["parallel"]

[features]
default = ["legacy", "zdict_builder", "bindgen"]
default = ["legacy", "zdict_builder", "bindgen", "bindgen-runtime"]

debug = [] # Enable zstd debug logs
experimental = [] # Expose experimental ZSTD API
Expand All @@ -85,5 +84,9 @@ seekable = [] # Enable support of the seekable format
fat-lto = [] # Enable fat-lto, will override thin-lto if specified
thin-lto = [] # Enable thin-lto, will fallback to fat-lto if not supported

# bindgen non-addititive features
bindgen-runtime = ["bindgen/runtime"]
bindgen-static = ["bindgen/static"]

[lints.rust]
non_upper_case_globals = "allow"