Skip to content

Commit

Permalink
chore(deps): update wasmtime (#62)
Browse files Browse the repository at this point in the history
Update wasmtime to latest version (13.0). Fix the build issues caused by
some changes to the API.

Signed-off-by: Flavio Castelli <[email protected]>
  • Loading branch information
flavio authored Sep 21, 2023
1 parent 538a604 commit 7163c43
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
8 changes: 4 additions & 4 deletions crates/wasmtime-provider/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,16 @@ wasi = ["wasi-common", "wasi-cap-std-sync", "wasmtime-wasi"]
[dependencies]
wapc = { path = "../wapc", version = "1.1.0" }
log = "0.4"
wasmtime = "12.0"
wasmtime = "13.0"
anyhow = "1.0"
thiserror = "1.0"
cfg-if = "1.0.0"
parking_lot = "0.12"
serde = { version = "1.0", features = ["derive"] }
# feature = wasi
wasmtime-wasi = { version = "12.0", optional = true }
wasi-common = { version = "12.0", optional = true }
wasi-cap-std-sync = { version = "12.0", optional = true }
wasmtime-wasi = { version = "13.0", optional = true }
wasi-common = { version = "13.0", optional = true }
wasi-cap-std-sync = { version = "13.0", optional = true }

[dev-dependencies]
wapc-codec = { path = "../wapc-codec" }
Expand Down
6 changes: 4 additions & 2 deletions crates/wasmtime-provider/src/wasi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,12 @@ pub(crate) fn init_ctx(
) -> Result<WasiCtx, Box<dyn Error + Send + Sync>> {
let mut ctx_builder = wasi_cap_std_sync::WasiCtxBuilder::new();

ctx_builder = ctx_builder.inherit_stdio().args(argv)?.envs(env)?;
ctx_builder.inherit_stdio();
ctx_builder.args(argv)?;
ctx_builder.envs(env)?;

for (name, file) in preopen_dirs {
ctx_builder = ctx_builder.preopened_dir(file.try_clone()?, name)?;
ctx_builder.preopened_dir(file.try_clone()?, name)?;
}

Ok(ctx_builder.build())
Expand Down

0 comments on commit 7163c43

Please sign in to comment.