diff --git a/Cargo.lock b/Cargo.lock index 88e88c82e5..bb27126f3a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3285,8 +3285,6 @@ dependencies = [ "tempfile", "test-programs", "tracing-subscriber", - "wasi-cap-std-sync", - "wasi-common", "wasmparser", "wasmtime", "wasmtime-cache", diff --git a/Cargo.toml b/Cargo.toml index 6bcd156b60..dcd82bac6b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -32,8 +32,6 @@ wasmtime-wast = { path = "crates/wast", version = "0.25.0" } wasmtime-wasi = { path = "crates/wasi", version = "0.25.0" } wasmtime-wasi-crypto = { path = "crates/wasi-crypto", version = "0.25.0", optional = true } wasmtime-wasi-nn = { path = "crates/wasi-nn", version = "0.25.0", optional = true } -wasi-common = { path = "crates/wasi-common", version = "0.25.0" } -wasi-cap-std-sync = { path = "crates/wasi-common/cap-std-sync", version = "0.25.0" } structopt = { version = "0.3.5", features = ["color", "suggestions"] } object = { version = "0.23.0", default-features = false, features = ["write"] } anyhow = "1.0.19" diff --git a/crates/c-api/src/wasi.rs b/crates/c-api/src/wasi.rs index 8fa15f0c20..828779ea8d 100644 --- a/crates/c-api/src/wasi.rs +++ b/crates/c-api/src/wasi.rs @@ -11,11 +11,10 @@ use std::path::{Path, PathBuf}; use std::rc::Rc; use std::slice; use std::str; -use wasi_cap_std_sync::WasiCtxBuilder; -use wasi_common::WasiCtx; use wasmtime::{Extern, Linker, Trap}; use wasmtime_wasi::{ snapshots::preview_0::Wasi as WasiSnapshot0, snapshots::preview_1::Wasi as WasiPreview1, + sync::WasiCtxBuilder, WasiCtx, }; unsafe fn cstr_to_path<'a>(path: *const c_char) -> Option<&'a Path> { @@ -186,7 +185,7 @@ pub unsafe extern "C" fn wasi_config_preopen_dir( }; let dir = match cstr_to_path(path) { - Some(p) => match cap_std::fs::Dir::open_ambient_dir(p) { + Some(p) => match Dir::open_ambient_dir(p) { Ok(d) => d, Err(_) => return false, }, diff --git a/src/commands/run.rs b/src/commands/run.rs index 89f9ec120f..33a5a255ad 100644 --- a/src/commands/run.rs +++ b/src/commands/run.rs @@ -11,9 +11,8 @@ use std::{ process, }; use structopt::{clap::AppSettings, StructOpt}; -use wasi_cap_std_sync::WasiCtxBuilder; use wasmtime::{Engine, Func, Linker, Module, Store, Trap, Val, ValType}; -use wasmtime_wasi::Wasi; +use wasmtime_wasi::{sync::WasiCtxBuilder, Wasi}; #[cfg(feature = "wasi-nn")] use wasmtime_wasi_nn::{WasiNn, WasiNnCtx};