Skip to content

Commit 1554ff1

Browse files
committed
refactor: move wasmtime-wasi p2-specific functionality to p2
Signed-off-by: Roman Volosatovs <[email protected]>
1 parent f6ec667 commit 1554ff1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+446
-1152
lines changed

crates/c-api/src/wasi.rs

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ use std::ffi::{c_char, CStr};
66
use std::fs::File;
77
use std::path::Path;
88
use std::slice;
9-
use wasmtime_wasi::{preview1::WasiP1Ctx, WasiCtxBuilder};
9+
use wasmtime_wasi::p2::WasiCtxBuilder;
10+
use wasmtime_wasi::preview1::WasiP1Ctx;
1011

1112
unsafe fn cstr_to_path<'a>(path: *const c_char) -> Option<&'a Path> {
1213
CStr::from_ptr(path).to_str().map(Path::new).ok()
@@ -105,8 +106,9 @@ pub unsafe extern "C" fn wasi_config_set_stdin_file(
105106
};
106107

107108
let file = tokio::fs::File::from_std(file);
108-
let stdin_stream =
109-
wasmtime_wasi::AsyncStdinStream::new(wasmtime_wasi::pipe::AsyncReadStream::new(file));
109+
let stdin_stream = wasmtime_wasi::p2::AsyncStdinStream::new(
110+
wasmtime_wasi::p2::pipe::AsyncReadStream::new(file),
111+
);
110112
config.builder.stdin(stdin_stream);
111113

112114
true
@@ -118,7 +120,7 @@ pub unsafe extern "C" fn wasi_config_set_stdin_bytes(
118120
binary: &mut wasm_byte_vec_t,
119121
) {
120122
let binary = binary.take();
121-
let binary = wasmtime_wasi::pipe::MemoryInputPipe::new(binary);
123+
let binary = wasmtime_wasi::p2::pipe::MemoryInputPipe::new(binary);
122124
config.builder.stdin(binary);
123125
}
124126

@@ -137,7 +139,9 @@ pub unsafe extern "C" fn wasi_config_set_stdout_file(
137139
None => return false,
138140
};
139141

140-
config.builder.stdout(wasmtime_wasi::OutputFile::new(file));
142+
config
143+
.builder
144+
.stdout(wasmtime_wasi::p2::OutputFile::new(file));
141145

142146
true
143147
}
@@ -157,7 +161,9 @@ pub unsafe extern "C" fn wasi_config_set_stderr_file(
157161
None => return false,
158162
};
159163

160-
config.builder.stderr(wasmtime_wasi::OutputFile::new(file));
164+
config
165+
.builder
166+
.stderr(wasmtime_wasi::p2::OutputFile::new(file));
161167

162168
true
163169
}

crates/test-programs/src/bin/api_reactor.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use std::sync::{Mutex, MutexGuard};
22

33
wit_bindgen::generate!({
44
world: "test-reactor",
5-
path: "../wasi/wit",
5+
path: "../wasi/src/p2/wit",
66
generate_all,
77
});
88

crates/wasi-common/src/tokio/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ impl WasiCtxBuilder {
113113
}
114114

115115
// Much of this mod is implemented in terms of `async` methods from the
116-
// wasmtime_wasi::sync module. These methods may be async in signature, however,
116+
// wasmtime_wasi::p2::sync module. These methods may be async in signature, however,
117117
// they are synchronous in implementation (always Poll::Ready on first poll)
118118
// and perform blocking syscalls.
119119
//

crates/wasi-config/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
//! component::{Linker, ResourceTable},
1818
//! Config, Engine, Result, Store,
1919
//! };
20-
//! use wasmtime_wasi::{IoView, WasiCtx, WasiCtxBuilder, WasiView};
20+
//! use wasmtime_wasi::p2::{IoView, WasiCtx, WasiCtxBuilder, WasiView};
2121
//! use wasmtime_wasi_config::{WasiConfig, WasiConfigVariables};
2222
//!
2323
//! #[tokio::main]
@@ -36,7 +36,7 @@
3636
//! });
3737
//!
3838
//! let mut linker = Linker::<Ctx>::new(&engine);
39-
//! wasmtime_wasi::add_to_linker_async(&mut linker)?;
39+
//! wasmtime_wasi::p2::add_to_linker_async(&mut linker)?;
4040
//! // add `wasi-config` world's interfaces to the linker
4141
//! wasmtime_wasi_config::add_to_linker(&mut linker, |h: &mut Ctx| {
4242
//! WasiConfig::from(&h.wasi_config_vars)

crates/wasi-config/tests/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use wasmtime::{
44
component::{Component, Linker, ResourceTable},
55
Store,
66
};
7-
use wasmtime_wasi::{
7+
use wasmtime_wasi::p2::{
88
add_to_linker_async, bindings::Command, IoView, WasiCtx, WasiCtxBuilder, WasiView,
99
};
1010
use wasmtime_wasi_config::{WasiConfig, WasiConfigVariables};

crates/wasi-http/src/bindings.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ mod generated {
1919
require_store_data_send: true,
2020
with: {
2121
// Upstream package dependencies
22-
"wasi:io": wasmtime_wasi::bindings::io,
22+
"wasi:io": wasmtime_wasi::p2::bindings::io,
2323

2424
// Configure all WIT http resources to be defined types in this
2525
// crate to use the `ResourceTable` helper methods.
@@ -63,7 +63,7 @@ pub mod sync {
6363
"wasi:http": crate::bindings::http,
6464
// sync requires the wrapper in the wasmtime_wasi crate, in
6565
// order to have in_tokio
66-
"wasi:io": wasmtime_wasi::bindings::sync::io,
66+
"wasi:io": wasmtime_wasi::p2::bindings::sync::io,
6767
},
6868
require_store_data_send: true,
6969
});

crates/wasi-http/src/body.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,8 @@ use std::mem;
1111
use std::task::{Context, Poll};
1212
use std::{pin::Pin, sync::Arc, time::Duration};
1313
use tokio::sync::{mpsc, oneshot};
14-
use wasmtime_wasi::{
15-
runtime::{poll_noop, AbortOnDropJoinHandle},
16-
InputStream, OutputStream, Pollable, StreamError,
17-
};
14+
use wasmtime_wasi::p2::{InputStream, OutputStream, Pollable, StreamError};
15+
use wasmtime_wasi::runtime::{poll_noop, AbortOnDropJoinHandle};
1816

1917
/// Common type for incoming bodies.
2018
pub type HyperIncomingBody = BoxBody<Bytes, types::ErrorCode>;

crates/wasi-http/src/http_impl.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ use bytes::Bytes;
1414
use http_body_util::{BodyExt, Empty};
1515
use hyper::Method;
1616
use wasmtime::component::Resource;
17-
use wasmtime_wasi::IoView;
17+
use wasmtime_wasi::p2::IoView;
1818

1919
impl<T> outgoing_handler::Host for WasiHttpImpl<T>
2020
where

crates/wasi-http/src/lib.rs

Lines changed: 37 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
//!
2828
//! All `bindgen!`-generated `Host` traits are implemented in terms of a
2929
//! [`WasiHttpView`] trait which provides basic access to [`WasiHttpCtx`],
30-
//! configuration for WASI HTTP, and a [`wasmtime_wasi::ResourceTable`], the
30+
//! configuration for WASI HTTP, and a [`wasmtime_wasi::p2::ResourceTable`], the
3131
//! state for all host-defined component model resources.
3232
//!
3333
//! The [`WasiHttpView`] trait additionally offers a few other configuration
@@ -53,7 +53,7 @@
5353
//! `wasi:http/proxy` together
5454
//! * Use [`add_only_http_to_linker_async`] to add only HTTP interfaces but
5555
//! no others. This is useful when working with
56-
//! [`wasmtime_wasi::add_to_linker_async`] for example.
56+
//! [`wasmtime_wasi::p2::add_to_linker_async`] for example.
5757
//! * Add individual interfaces such as with the
5858
//! [`bindings::http::outgoing_handler::add_to_linker_get_host`] function.
5959
//! 3. Use [`ProxyPre`](bindings::ProxyPre) to pre-instantiate a component
@@ -71,7 +71,7 @@
7171
//! use tokio::net::TcpListener;
7272
//! use wasmtime::component::{Component, Linker, ResourceTable};
7373
//! use wasmtime::{Config, Engine, Result, Store};
74-
//! use wasmtime_wasi::{IoView, WasiCtx, WasiCtxBuilder, WasiView};
74+
//! use wasmtime_wasi::p2::{IoView, WasiCtx, WasiCtxBuilder, WasiView};
7575
//! use wasmtime_wasi_http::bindings::ProxyPre;
7676
//! use wasmtime_wasi_http::bindings::http::types::Scheme;
7777
//! use wasmtime_wasi_http::body::HyperOutgoingBody;
@@ -237,7 +237,7 @@ pub use crate::types::{
237237
WasiHttpCtx, WasiHttpImpl, WasiHttpView, DEFAULT_OUTGOING_BODY_BUFFER_CHUNKS,
238238
DEFAULT_OUTGOING_BODY_CHUNK_SIZE,
239239
};
240-
use wasmtime_wasi::IoImpl;
240+
use wasmtime_wasi::p2::IoImpl;
241241
/// Add all of the `wasi:http/proxy` world's interfaces to a [`wasmtime::component::Linker`].
242242
///
243243
/// This function will add the `async` variant of all interfaces into the
@@ -252,7 +252,7 @@ use wasmtime_wasi::IoImpl;
252252
/// ```
253253
/// use wasmtime::{Engine, Result, Config};
254254
/// use wasmtime::component::{ResourceTable, Linker};
255-
/// use wasmtime_wasi::{IoView, WasiCtx, WasiView};
255+
/// use wasmtime_wasi::p2::{IoView, WasiCtx, WasiView};
256256
/// use wasmtime_wasi_http::{WasiHttpCtx, WasiHttpView};
257257
///
258258
/// fn main() -> Result<()> {
@@ -285,20 +285,21 @@ use wasmtime_wasi::IoImpl;
285285
/// ```
286286
pub fn add_to_linker_async<T>(l: &mut wasmtime::component::Linker<T>) -> anyhow::Result<()>
287287
where
288-
T: WasiHttpView + wasmtime_wasi::WasiView,
288+
T: WasiHttpView + wasmtime_wasi::p2::WasiView,
289289
{
290-
let io_closure = type_annotate_io::<T, _>(|t| wasmtime_wasi::IoImpl(t));
291-
wasmtime_wasi::bindings::io::poll::add_to_linker_get_host(l, io_closure)?;
292-
wasmtime_wasi::bindings::io::error::add_to_linker_get_host(l, io_closure)?;
293-
wasmtime_wasi::bindings::io::streams::add_to_linker_get_host(l, io_closure)?;
290+
let io_closure = type_annotate_io::<T, _>(|t| wasmtime_wasi::p2::IoImpl(t));
291+
wasmtime_wasi::p2::bindings::io::poll::add_to_linker_get_host(l, io_closure)?;
292+
wasmtime_wasi::p2::bindings::io::error::add_to_linker_get_host(l, io_closure)?;
293+
wasmtime_wasi::p2::bindings::io::streams::add_to_linker_get_host(l, io_closure)?;
294294

295-
let closure = type_annotate_wasi::<T, _>(|t| wasmtime_wasi::WasiImpl(wasmtime_wasi::IoImpl(t)));
296-
wasmtime_wasi::bindings::clocks::wall_clock::add_to_linker_get_host(l, closure)?;
297-
wasmtime_wasi::bindings::clocks::monotonic_clock::add_to_linker_get_host(l, closure)?;
298-
wasmtime_wasi::bindings::cli::stdin::add_to_linker_get_host(l, closure)?;
299-
wasmtime_wasi::bindings::cli::stdout::add_to_linker_get_host(l, closure)?;
300-
wasmtime_wasi::bindings::cli::stderr::add_to_linker_get_host(l, closure)?;
301-
wasmtime_wasi::bindings::random::random::add_to_linker_get_host(l, closure)?;
295+
let closure =
296+
type_annotate_wasi::<T, _>(|t| wasmtime_wasi::p2::WasiImpl(wasmtime_wasi::p2::IoImpl(t)));
297+
wasmtime_wasi::p2::bindings::clocks::wall_clock::add_to_linker_get_host(l, closure)?;
298+
wasmtime_wasi::p2::bindings::clocks::monotonic_clock::add_to_linker_get_host(l, closure)?;
299+
wasmtime_wasi::p2::bindings::cli::stdin::add_to_linker_get_host(l, closure)?;
300+
wasmtime_wasi::p2::bindings::cli::stdout::add_to_linker_get_host(l, closure)?;
301+
wasmtime_wasi::p2::bindings::cli::stderr::add_to_linker_get_host(l, closure)?;
302+
wasmtime_wasi::p2::bindings::random::random::add_to_linker_get_host(l, closure)?;
302303

303304
add_only_http_to_linker_async(l)
304305
}
@@ -313,21 +314,21 @@ where
313314
}
314315
fn type_annotate_wasi<T, F>(val: F) -> F
315316
where
316-
F: Fn(&mut T) -> wasmtime_wasi::WasiImpl<&mut T>,
317+
F: Fn(&mut T) -> wasmtime_wasi::p2::WasiImpl<&mut T>,
317318
{
318319
val
319320
}
320321
fn type_annotate_io<T, F>(val: F) -> F
321322
where
322-
F: Fn(&mut T) -> wasmtime_wasi::IoImpl<&mut T>,
323+
F: Fn(&mut T) -> wasmtime_wasi::p2::IoImpl<&mut T>,
323324
{
324325
val
325326
}
326327

327328
/// A slimmed down version of [`add_to_linker_async`] which only adds
328329
/// `wasi:http` interfaces to the linker.
329330
///
330-
/// This is useful when using [`wasmtime_wasi::add_to_linker_async`] for
331+
/// This is useful when using [`wasmtime_wasi::p2::add_to_linker_async`] for
331332
/// example to avoid re-adding the same interfaces twice.
332333
pub fn add_only_http_to_linker_async<T>(
333334
l: &mut wasmtime::component::Linker<T>,
@@ -353,7 +354,7 @@ where
353354
/// ```
354355
/// use wasmtime::{Engine, Result, Config};
355356
/// use wasmtime::component::{ResourceTable, Linker};
356-
/// use wasmtime_wasi::{IoView, WasiCtx, WasiView};
357+
/// use wasmtime_wasi::p2::{IoView, WasiCtx, WasiView};
357358
/// use wasmtime_wasi_http::{WasiHttpCtx, WasiHttpView};
358359
///
359360
/// fn main() -> Result<()> {
@@ -384,24 +385,25 @@ where
384385
/// ```
385386
pub fn add_to_linker_sync<T>(l: &mut wasmtime::component::Linker<T>) -> anyhow::Result<()>
386387
where
387-
T: WasiHttpView + wasmtime_wasi::WasiView,
388+
T: WasiHttpView + wasmtime_wasi::p2::WasiView,
388389
{
389-
let io_closure = type_annotate_io::<T, _>(|t| wasmtime_wasi::IoImpl(t));
390+
let io_closure = type_annotate_io::<T, _>(|t| wasmtime_wasi::p2::IoImpl(t));
390391
// For the sync linker, use the definitions of poll and streams from the
391-
// wasmtime_wasi::bindings::sync space because those are defined using in_tokio.
392-
wasmtime_wasi::bindings::sync::io::poll::add_to_linker_get_host(l, io_closure)?;
393-
wasmtime_wasi::bindings::sync::io::streams::add_to_linker_get_host(l, io_closure)?;
392+
// wasmtime_wasi::p2::bindings::sync space because those are defined using in_tokio.
393+
wasmtime_wasi::p2::bindings::sync::io::poll::add_to_linker_get_host(l, io_closure)?;
394+
wasmtime_wasi::p2::bindings::sync::io::streams::add_to_linker_get_host(l, io_closure)?;
394395
// The error interface in the wasmtime_wasi is synchronous
395-
wasmtime_wasi::bindings::io::error::add_to_linker_get_host(l, io_closure)?;
396+
wasmtime_wasi::p2::bindings::io::error::add_to_linker_get_host(l, io_closure)?;
396397

397-
let closure = type_annotate_wasi::<T, _>(|t| wasmtime_wasi::WasiImpl(wasmtime_wasi::IoImpl(t)));
398+
let closure =
399+
type_annotate_wasi::<T, _>(|t| wasmtime_wasi::p2::WasiImpl(wasmtime_wasi::p2::IoImpl(t)));
398400

399-
wasmtime_wasi::bindings::clocks::wall_clock::add_to_linker_get_host(l, closure)?;
400-
wasmtime_wasi::bindings::clocks::monotonic_clock::add_to_linker_get_host(l, closure)?;
401-
wasmtime_wasi::bindings::cli::stdin::add_to_linker_get_host(l, closure)?;
402-
wasmtime_wasi::bindings::cli::stdout::add_to_linker_get_host(l, closure)?;
403-
wasmtime_wasi::bindings::cli::stderr::add_to_linker_get_host(l, closure)?;
404-
wasmtime_wasi::bindings::random::random::add_to_linker_get_host(l, closure)?;
401+
wasmtime_wasi::p2::bindings::clocks::wall_clock::add_to_linker_get_host(l, closure)?;
402+
wasmtime_wasi::p2::bindings::clocks::monotonic_clock::add_to_linker_get_host(l, closure)?;
403+
wasmtime_wasi::p2::bindings::cli::stdin::add_to_linker_get_host(l, closure)?;
404+
wasmtime_wasi::p2::bindings::cli::stdout::add_to_linker_get_host(l, closure)?;
405+
wasmtime_wasi::p2::bindings::cli::stderr::add_to_linker_get_host(l, closure)?;
406+
wasmtime_wasi::p2::bindings::random::random::add_to_linker_get_host(l, closure)?;
405407

406408
add_only_http_to_linker_sync(l)?;
407409

@@ -411,7 +413,7 @@ where
411413
/// A slimmed down version of [`add_to_linker_sync`] which only adds
412414
/// `wasi:http` interfaces to the linker.
413415
///
414-
/// This is useful when using [`wasmtime_wasi::add_to_linker_sync`] for
416+
/// This is useful when using [`wasmtime_wasi::p2::add_to_linker_sync`] for
415417
/// example to avoid re-adding the same interfaces twice.
416418
pub fn add_only_http_to_linker_sync<T>(l: &mut wasmtime::component::Linker<T>) -> anyhow::Result<()>
417419
where

crates/wasi-http/src/types.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ use std::time::Duration;
1818
use tokio::net::TcpStream;
1919
use tokio::time::timeout;
2020
use wasmtime::component::{Resource, ResourceTable};
21-
use wasmtime_wasi::{runtime::AbortOnDropJoinHandle, IoImpl, IoView, Pollable};
21+
use wasmtime_wasi::p2::{IoImpl, IoView, Pollable};
22+
use wasmtime_wasi::runtime::AbortOnDropJoinHandle;
2223

2324
/// Capture the state necessary for use in the wasi-http API implementation.
2425
#[derive(Debug)]
@@ -39,7 +40,7 @@ impl WasiHttpCtx {
3940
///
4041
/// ```
4142
/// use wasmtime::component::ResourceTable;
42-
/// use wasmtime_wasi::{IoView, WasiCtx, WasiView, WasiCtxBuilder};
43+
/// use wasmtime_wasi::p2::{IoView, WasiCtx, WasiView, WasiCtxBuilder};
4344
/// use wasmtime_wasi_http::{WasiHttpCtx, WasiHttpView};
4445
///
4546
/// struct MyState {

crates/wasi-http/src/types_impl.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ use anyhow::Context;
1414
use std::any::Any;
1515
use std::str::FromStr;
1616
use wasmtime::component::{Resource, ResourceTable, ResourceTableError};
17-
use wasmtime_wasi::{DynInputStream, DynOutputStream, DynPollable, IoView};
17+
use wasmtime_wasi::p2::{DynInputStream, DynOutputStream, DynPollable, IoView};
1818

1919
impl<T> crate::bindings::http::types::Host for WasiHttpImpl<T>
2020
where
@@ -660,7 +660,7 @@ where
660660
&mut self,
661661
index: Resource<HostFutureTrailers>,
662662
) -> wasmtime::Result<Resource<DynPollable>> {
663-
wasmtime_wasi::subscribe(self.table(), index)
663+
wasmtime_wasi::p2::subscribe(self.table(), index)
664664
}
665665

666666
fn get(
@@ -881,7 +881,7 @@ where
881881
&mut self,
882882
id: Resource<HostFutureIncomingResponse>,
883883
) -> wasmtime::Result<Resource<DynPollable>> {
884-
wasmtime_wasi::subscribe(self.table(), id)
884+
wasmtime_wasi::p2::subscribe(self.table(), id)
885885
}
886886
}
887887

crates/wasi-http/tests/all/async_.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use super::*;
22
use test_programs_artifacts::*;
3-
use wasmtime_wasi::bindings::Command;
3+
use wasmtime_wasi::p2::bindings::Command;
44

55
foreach_http!(assert_test_exists);
66

@@ -12,7 +12,7 @@ async fn run(path: &str, server: &Server) -> Result<()> {
1212
let component = Component::from_file(&engine, path)?;
1313
let mut store = store(&engine, server);
1414
let mut linker = Linker::new(&engine);
15-
wasmtime_wasi::add_to_linker_async(&mut linker)?;
15+
wasmtime_wasi::p2::add_to_linker_async(&mut linker)?;
1616
wasmtime_wasi_http::add_only_http_to_linker_async(&mut linker)?;
1717
let command = Command::instantiate_async(&mut store, &component, &linker).await?;
1818
let result = command.wasi_cli_run().call_run(&mut store).await?;

crates/wasi-http/tests/all/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ use wasmtime::{
1111
component::{Component, Linker, ResourceTable},
1212
Config, Engine, Store,
1313
};
14-
use wasmtime_wasi::{self, pipe::MemoryOutputPipe, IoView, WasiCtx, WasiCtxBuilder, WasiView};
14+
use wasmtime_wasi::p2::{pipe::MemoryOutputPipe, IoView, WasiCtx, WasiCtxBuilder, WasiView};
1515
use wasmtime_wasi_http::{
1616
bindings::http::types::{ErrorCode, Scheme},
1717
body::HyperOutgoingBody,

crates/wasi-http/tests/all/sync.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use super::*;
22
use test_programs_artifacts::*;
3-
use wasmtime_wasi::bindings::sync::Command;
3+
use wasmtime_wasi::p2::bindings::sync::Command;
44

55
foreach_http!(assert_test_exists);
66

@@ -11,7 +11,7 @@ fn run(path: &str, server: &Server) -> Result<()> {
1111
let component = Component::from_file(&engine, path)?;
1212
let mut store = store(&engine, server);
1313
let mut linker = Linker::new(&engine);
14-
wasmtime_wasi::add_to_linker_sync(&mut linker)?;
14+
wasmtime_wasi::p2::add_to_linker_sync(&mut linker)?;
1515
wasmtime_wasi_http::add_only_http_to_linker_sync(&mut linker)?;
1616
let command = Command::instantiate(&mut store, &component, &linker)?;
1717
let result = command.wasi_cli_run().call_run(&mut store)?;

0 commit comments

Comments
 (0)