File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -69,12 +69,13 @@ debug = [] # Enable zstd debug logs
6969experimental = [] # Expose experimental ZSTD API
7070legacy = [] # Enable legacy ZSTD support (for versions < zstd-0.8)
7171non-cargo = [] # Silence cargo-specific build flags
72- pkg-config = []
72+ pkg-config = [] # Use pkg-config to build the zstd C library.
7373std = [] # Deprecated: we never use types from std.
7474zstdmt = [] # Enable multi-thread support (with pthread)
7575thin = [] # Optimize binary by size
7676no_asm = [] # Disable ASM files (only on amd64 for decompression)
77- zdict_builder = []
77+ zdict_builder = [] # Enable dictionary building (dictionary _using_ is always supported).
78+ no_wasm_shim = [] # Disable wasm shims (in case your wasm toolchain includes a C stdlib).
7879
7980# These two are for cross-language LTO.
8081# Will only work if `clang` is used to build the C library.
Original file line number Diff line number Diff line change @@ -133,9 +133,10 @@ fn compile_zstd() {
133133 // Note that Emscripten already provides its own C standard library so
134134 // wasm32-unknown-emscripten should not be included here.
135135 // See: https://github.com/gyscos/zstd-rs/pull/209
136- let need_wasm_shim = env:: var ( "TARGET" ) . map_or ( false , |target| {
137- target == "wasm32-unknown-unknown" || target == "wasm32-wasi"
138- } ) ;
136+ let need_wasm_shim = !cfg ! ( feature = "no_wasm_shim" )
137+ && env:: var ( "TARGET" ) . map_or ( false , |target| {
138+ target == "wasm32-unknown-unknown" || target == "wasm32-wasi"
139+ } ) ;
139140
140141 if need_wasm_shim {
141142 cargo_print ( & "rerun-if-changed=wasm-shim/stdlib.h" ) ;
You can’t perform that action at this time.
0 commit comments