Replies: 5 comments 4 replies
-
Yes, This is not required, there are abstractions that allow replacing everything with other/custom async runtimes. Note that it needs to be an async runtime, because a lot of of the plumbing builds on async. You can also use things like In particular, you will need to customize the You'll at the very least need an implementation of For the file system, by default it's all in-memory and should just work. |
Beta Was this translation helpful? Give feedback.
-
Also note that some of the traits build on top of tokio traits like |
Beta Was this translation helpful? Give feedback.
-
Got it, I was asking because I'm trying to upgrade from Before the upgrade, I could do something like the following: wasi_env
.tasks()
.block_on(...); This migrated to: wasi_env
.runtime()
.task_manager()
.spawn_and_block_on(...): But it doesn't even make it to this section now since it panics when I finalize my let mut wasi_env = WasiEnv::builder(function_name.clone())
.envs(call_data.envs.clone())
.args(call_data.args.clone())
.stdout(Box::new(stdout_tx))
.stderr(Box::new(stderr_tx))
.finalize(&mut context.wasm_store)
.map_err(|_| VmResultStatus::WasiEnvInitializeFailure)?; So we now need to create a custom runtime or get tokio to work with our current setup? |
Beta Was this translation helpful? Give feedback.
-
Not sure if we use the |
Beta Was this translation helpful? Give feedback.
-
What's your current setup and requirements? |
Beta Was this translation helpful? Give feedback.
-
Summary
It seems
wasmer-wasix
requires you to run atokio
runtime whensys-thread
is enabled. And if that feature is not enabled, it panics?There are not any docs that enable this feature require a
tokio
runtime.Is there a way to handle this without a
tokio
runtime? If so, what's an example?Additional details
Corresponding snippets from the
wasmer-wasix
library.Beta Was this translation helpful? Give feedback.
All reactions