1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
[]
= "structured-zstd"
= "0.0.25"
= "1.92"
= [
"Moritz Borcherding <moritz.borcherding@web.de>",
"Structured World Foundation <foundation@sw.foundation>",
]
= "2024"
= "Apache-2.0"
= "https://github.com/structured-world/structured-zstd"
= "https://github.com/structured-world/structured-zstd"
= "Pure Rust zstd implementation — managed fork of ruzstd. Dictionary decompression, no FFI."
= ["fuzz_decodecorpus/*", "decodecorpus_files/*", "dict_tests/files/**"]
# Package metadata points at a crate-local symlink so the packaged crate and repo root README stay in sync.
= "README.md"
= ["zstd", "zstandard", "decompression", "compression", "pure-rust"]
= ["compression"]
# docs.rs builds the crate with the public feature set so feature-gated
# items (e.g. the `dictionary` module behind `dict_builder`) appear in the
# published documentation. We list the public features explicitly rather
# than using `all-features = true` because the manifest also exposes
# `rustc-dep-of-std` (libstd-build-only — swaps in `rustc-std-workspace-*`
# crates), `bench_internals` (widens the API surface for benches), and
# `fuzz_exports` (widens it for fuzz targets); none of these should appear
# on docs.rs. The `--cfg docsrs` flag activates the
# `#[cfg_attr(docsrs, doc(cfg(...)))]` annotations that render feature
# badges on each item.
[]
= ["std", "hash", "dict_builder", "lsm"]
= ["--cfg", "docsrs"]
[]
# Locked behind the `hash` feature flag
= { = "2.0", = false, = ["xxhash64"], = true }
= { = "2.3.0", = true }
# Optional sync primitive for the FSE default-table cache on no-atomic
# targets (Cortex-M0/M0+, AVR, MSP430 — anywhere `target_has_atomic =
# "ptr"` is false). When this feature is enabled the cache uses a
# critical-section-protected `static mut` slot; when disabled the
# no-atomic build skips the cache entirely and returns an owned
# `Box<FSETable>` per call, dropped with the owning `FrameCompressor`
# (no leak — same memory shape as the pre-cache status quo on those
# targets). On targets with atomic pointer support (every modern
# desktop / server / mobile / Cortex-M3+ / RISC-V-A target) the dep
# is dead code and never instantiated — those targets use the lock-
# free `AtomicPtr` path unconditionally.
= { = "1.2", = true }
# Internal feature, only used when building as part of libstd, not part of the
# stable interface of this crate.
= { = "0.1.2", = true }
= { = "1.0.0", = true, = "rustc-std-workspace-core" }
= { = "1.0.0", = true, = "rustc-std-workspace-alloc" }
[]
= "0.8"
= "0.10"
= { = "0.13.3", = ["zdict_builder", "experimental"] }
[]
= ["hash", "std"]
= ["std", "dep:fastrand"]
= ["dep:twox-hash"]
# Opt-in cache for FSE default tables on no-atomic targets. See
# `fse_encoder::default_*_table` for the implementation split. On
# targets with atomic pointer support this feature is a no-op.
= ["dep:critical-section"]
= []
= []
= []
# Diagnostic tracing of the Fast kernel's inner loop — per-iteration state
# dumps gated at compile time so production builds carry zero cost. Runtime
# activation via `STRUCTURED_ZSTD_KERNEL_TRACE=1` env var. Used by the
# `trace_fast_kernel` example for #220 ratio-divergence investigation.
= ["std"]
# Opt-in storage-format extensions: typed Rust APIs that downstream
# storage / wire-format consumers (lsm-tree, future graph stores) can
# layer on top of the spec-mandated zstd decoder behaviour. Default
# off, no C FFI symbols added regardless of this feature's state.
# Currently exposes:
# - expected-field validation setters on `FrameDecoder`
# (`expect_dict_id` / `expect_window_descriptor`) for wire-format
# consumers that need post-AEAD-decrypt sanity checks against a
# pinned `dict_id` / `window_descriptor`.
# - typed `SkippableFrame` builder + `write_skippable_frame` free
# function in `zstd::skippable` for RFC 8878 §3.1 skippable
# frames (16-variant magic + 4-byte LE length + payload).
# Other typed APIs land here over time as bilateral storage-format
# work expands the surface.
= []
# Internal feature, only used when building as part of libstd, not part of the
# stable interface of this crate.
= ["dep:compiler_builtins", "dep:core", "dep:alloc"]
[[]]
= "decode_all"
= false
[[]]
= "huf_decode_kernels"
= false
[[]]
= "compare_ffi"
= false
= ["dict_builder"]
[[]]
= "compare_ffi_memory"
= false
= ["dict_builder"]
[[]]
= "compare_ffi_sequences"
= false
= ["dict_builder", "bench_internals"]
[[]]
= "bitstream"
= false
= ["bench_internals"]
[[]]
= "dict_builder_fastcover"
= false
= ["dict_builder"]
[[]]
= "decode_dict_handle"
= false
[[]]
= "wildcopy_candidates"
= false
= ["bench_internals"]
[[]]
= "block_splitter_donor_parity"
= ["bench_internals"]