HI, to accomodate the dotnet runtime in the runtime tests I need to use instantiate_async
because the dotnet runtime requires crate::testwasi::add_to_linker
. I can proceed with a PR for this making all the export test functions async, and adding appropriate await
s etc. Is this going to be accepted, i.e. all future export tests will have to be async?
Switching to async shouldn't be an issue, but I'd also be curious to dig into why you need async here. For testwasi stuff in the wit bindgen repo I wouldn't expect a sync to be necessary or required unless explicitly opted into
Ok, let me investigate some more, maybe I can revert it which would be ideal
The async requirement starts from https://github.com/bytecodealliance/wasmtime/blob/f952ff274446035695fdf2fd53e75f8be0dcfbd4/crates/wasi/src/preview2/command.rs#L34 which goes to https://github.com/bytecodealliance/wasmtime/blob/f952ff274446035695fdf2fd53e75f8be0dcfbd4/crates/wasi/src/preview2/mod.rs#L94 and a lot here are async
could you use wasmtime_wasi::preview2::command::sync::add_to_linker
instead?
Ah, I missed that. Thanks, that solves my problem!
Scott Waye has marked this topic as resolved.
Last updated: Nov 22 2024 at 17:03 UTC