wasmtime-wasi: re-export wasi-cap-std-sync

This commit is contained in:
Pat Hickey
2021-03-25 16:49:31 -07:00
parent 211731b876
commit 19a802549f
3 changed files with 14 additions and 0 deletions

1
Cargo.lock generated
View File

@@ -3513,6 +3513,7 @@ name = "wasmtime-wasi"
version = "0.25.0"
dependencies = [
"anyhow",
"wasi-cap-std-sync",
"wasi-common",
"wasmtime",
"wasmtime-wiggle",

View File

@@ -14,7 +14,12 @@ build = "build.rs"
[dependencies]
wasi-common = { path = "../wasi-common", version = "0.25.0" }
wasi-cap-std-sync = { path = "../wasi-common/cap-std-sync", version = "0.25.0", optional = true }
wiggle = { path = "../wiggle", default-features = false, version = "0.25.0" }
wasmtime-wiggle = { path = "../wiggle/wasmtime", default-features = false, version = "0.25.0" }
wasmtime = { path = "../wasmtime", default-features = false, version = "0.25.0" }
anyhow = "1.0"
[features]
default = ["sync"]
sync = ["wasi-cap-std-sync"]

View File

@@ -12,6 +12,14 @@ use std::rc::Rc;
pub use wasi_common::{Error, WasiCtx, WasiCtxBuilder, WasiDir, WasiFile};
use wasmtime::{Config, Linker, Store};
/// Re-export the commonly used wasi-cap-std-sync crate here. This saves
/// consumers of this library from having to keep additional dependencies
/// in sync.
#[cfg(feature = "sync")]
pub mod sync {
pub use wasi_cap_std_sync::*;
}
/// An instantiated instance of all available wasi exports. Presently includes
/// both the "preview1" snapshot and the "unstable" (preview0) snapshot.
pub struct Wasi {