-
Notifications
You must be signed in to change notification settings - Fork 824
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to use wasmer run ...
inside a running WASIX program
#4269
Comments
The virtual "wasmer run" command available in wasix was switched to a inline waker for resolving the future, but it calls BinaryPackage::from_registry, which needs to run in a tokio runtime, due to doing web requests for package retrieval. Easily fixed by delegating to the main runtime. Closes #4269
The virtual "wasmer run" command available in wasix was switched to a inline waker for resolving the future, but it calls BinaryPackage::from_registry, which needs to run in a tokio runtime, due to doing web requests for package retrieval. Easily fixed by delegating to the main runtime. Closes #4269
Hey all, I'm still getting this error but instead when trying to use wasmer_wasix in rust:
I'm assuming it's because a new version of |
Nope it seems something else is wrong, even if I do seems to be pointing to: /// A wrapper type around Stdin that implements `VirtualFile`.
#[derive(Debug)]
#[cfg_attr(feature = "enable-serde", derive(Serialize, Deserialize))]
pub struct Stdin {
read_buffer: Arc<std::sync::Mutex<Option<Bytes>>>,
handle: Handle,
inner: tokio::io::Stdin,
}
impl Default for Stdin {
fn default() -> Self {
Self {
handle: Handle::current(),
read_buffer: Arc::new(std::sync::Mutex::new(None)),
inner: tokio::io::stdin(),
}
}
} So does this require being in a |
Describe the bug
When using the
wasmer
CLI natively (e.g. on MacOS), thewasmer run
virtual command that WASIX programs get access to will always trigger a panic.Steps to reproduce
Expected behavior
The Python interepreter should start and show a prompt.
Actual behavior
We get a panic because a syscall calls an asynchronous function and uses
__asyncify_light()
to wait until it completes. However, because that async function calls into tokio code and__asyncify_light()
is just a wrapper aroundfutures::executor::block_on()
, we end up calling tokio code outside of a tokio runtime and trigger a panic.Additional Context
You can see the original conversation and discovery on Slack.
The text was updated successfully, but these errors were encountered: