wasmtime-wasi: re-export wasi-cap-std-sync
This commit is contained in:
1
Cargo.lock
generated
1
Cargo.lock
generated
@@ -3513,6 +3513,7 @@ name = "wasmtime-wasi"
|
|||||||
version = "0.25.0"
|
version = "0.25.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
|
"wasi-cap-std-sync",
|
||||||
"wasi-common",
|
"wasi-common",
|
||||||
"wasmtime",
|
"wasmtime",
|
||||||
"wasmtime-wiggle",
|
"wasmtime-wiggle",
|
||||||
|
|||||||
@@ -14,7 +14,12 @@ build = "build.rs"
|
|||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
wasi-common = { path = "../wasi-common", version = "0.25.0" }
|
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" }
|
wiggle = { path = "../wiggle", default-features = false, version = "0.25.0" }
|
||||||
wasmtime-wiggle = { path = "../wiggle/wasmtime", 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" }
|
wasmtime = { path = "../wasmtime", default-features = false, version = "0.25.0" }
|
||||||
anyhow = "1.0"
|
anyhow = "1.0"
|
||||||
|
|
||||||
|
[features]
|
||||||
|
default = ["sync"]
|
||||||
|
sync = ["wasi-cap-std-sync"]
|
||||||
|
|||||||
@@ -12,6 +12,14 @@ use std::rc::Rc;
|
|||||||
pub use wasi_common::{Error, WasiCtx, WasiCtxBuilder, WasiDir, WasiFile};
|
pub use wasi_common::{Error, WasiCtx, WasiCtxBuilder, WasiDir, WasiFile};
|
||||||
use wasmtime::{Config, Linker, Store};
|
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
|
/// An instantiated instance of all available wasi exports. Presently includes
|
||||||
/// both the "preview1" snapshot and the "unstable" (preview0) snapshot.
|
/// both the "preview1" snapshot and the "unstable" (preview0) snapshot.
|
||||||
pub struct Wasi {
|
pub struct Wasi {
|
||||||
|
|||||||
Reference in New Issue
Block a user