Skip to content

Commit

Permalink
feat: Compatible compilation to other WebAssembly environments
Browse files Browse the repository at this point in the history
Troubleshooting a problem where `WebAssembly` compiles into a browser or `Emscripten` environment with an error that the `is_valid` implementation is not found.
  • Loading branch information
cbbfcd authored Aug 26, 2024
1 parent efd571d commit 1419d2b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/checker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ impl Checker for ExecutableChecker {
fn is_valid(&self, _path: &Path) -> bool {
true
}

#[cfg(all(target_arch = "wasm32", not(target_os = "wasi")))]
fn is_valid(&self, _path: &Path) -> bool {
true
}
}

pub struct ExistedChecker;
Expand Down

0 comments on commit 1419d2b

Please sign in to comment.