Skip to content

Commit

Permalink
cleanup: more changes for wasip1
Browse files Browse the repository at this point in the history
  • Loading branch information
zshipko committed Nov 8, 2024
1 parent 127efcb commit 759f091
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bin/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ fn main() {
println!("cargo::rerun-if-changed={path}");
std::fs::copy(path, out).unwrap();
} else {
println!("cargo::rerun-if-changed=../lib/target/wasm32-wasi/release/core.wasm");
std::fs::copy("../lib/target/wasm32-wasi/release/core.wasm", out).unwrap();
println!("cargo::rerun-if-changed=../lib/target/wasm32-wasip1/release/core.wasm");
std::fs::copy("../lib/target/wasm32-wasip1/release/core.wasm", out).unwrap();
}
}
10 changes: 10 additions & 0 deletions bin/src/opt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,21 @@ fn find_deps() -> PathBuf {
return in_repo;
}

let in_repo = PathBuf::from("../lib/target/wasm32-wasip1/wasi-deps");
if in_repo.exists() {
return in_repo;
}

let in_repo_root = PathBuf::from("lib/target/wasm32-wasi/wasi-deps");
if in_repo_root.exists() {
return in_repo_root;
}

let in_repo_root = PathBuf::from("lib/target/wasm32-wasip1/wasi-deps");
if in_repo_root.exists() {
return in_repo_root;
}

let usr_local_share = PathBuf::from("/usr/local/share/extism-py");
if usr_local_share.exists() {
return usr_local_share;
Expand Down

0 comments on commit 759f091

Please sign in to comment.