Skip to content

Commit

Permalink
Update need_wasm_shim logic for wasm32-wasip1 (#289)
Browse files Browse the repository at this point in the history
* fix unexpected cfg

--> src/stream/functions.rs:58:7
   |
58 | #[cfg(tests)]
   |       ^^^^^ help: there is a config with a similar name: `test`

* update `need_wasm_shim` logic for `wasm32-wasip1`

The `wasm32-wasi` target is being renamed to `wasm32-wasip1` and the
`wasm32-wasi` target will be removed in the future. It looks like the
shim will also be useful (required?) for `wasm32-wasip2`.
  • Loading branch information
Mrmaxmeier authored Jul 9, 2024
1 parent fcf7949 commit fc3a731
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/stream/functions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,5 @@ where
Ok(())
}

#[cfg(tests)]
#[cfg(test)]
mod tests {}
2 changes: 1 addition & 1 deletion zstd-safe/zstd-sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ fn compile_zstd() {
// See: https://github.com/gyscos/zstd-rs/pull/209
let need_wasm_shim = !cfg!(feature = "no_wasm_shim")
&& env::var("TARGET").map_or(false, |target| {
target == "wasm32-unknown-unknown" || target == "wasm32-wasi"
target == "wasm32-unknown-unknown" || target.starts_with("wasm32-wasi")
});

if need_wasm_shim {
Expand Down

0 comments on commit fc3a731

Please sign in to comment.