only wasi_cap_std_sync and wasi_tokio need to define WasiCtxBuilders (#2917)
* wasmtime-wasi: re-exporting this WasiCtxBuilder was shadowing the right one wasi-common's WasiCtxBuilder is really only useful wasi_cap_std_sync and wasi_tokio to implement their own Builder on top of. This re-export of wasi-common's is 1. not useful and 2. shadow's the re-export of the right one in sync::*. * wasi-common: eliminate WasiCtxBuilder, make the builder methods on WasiCtx instead * delete wasi-common::WasiCtxBuilder altogether just put those methods directly on &mut WasiCtx. As a bonus, the sync and tokio WasiCtxBuilder::build functions are no longer fallible! * bench fixes * more test fixes
This commit is contained in:
@@ -18,7 +18,7 @@ fn main() -> Result<()> {
|
||||
WasiCtxBuilder::new()
|
||||
.inherit_stdio()
|
||||
.inherit_args()?
|
||||
.build()?,
|
||||
.build(),
|
||||
);
|
||||
wasi.add_to_linker(&mut linker)?;
|
||||
|
||||
|
||||
@@ -146,7 +146,7 @@ async fn _run_wasm(inputs: Inputs) -> Result<(), Error> {
|
||||
.inherit_stdout()
|
||||
// Set an environment variable so the wasm knows its name.
|
||||
.env("NAME", &inputs.name)?
|
||||
.build()?,
|
||||
.build(),
|
||||
)
|
||||
.map_err(|_| anyhow!("setting wasi context"))?;
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ fn main() -> Result<()> {
|
||||
WasiCtxBuilder::new()
|
||||
.inherit_stdio()
|
||||
.inherit_args()?
|
||||
.build()?
|
||||
.build()
|
||||
)
|
||||
.is_ok());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user