Hello, was wondering if this planned to be merged? https://github.com/tokio-rs/mio/pull/1836
That's up to the mio maintainers. So far, the feedback has been that it won't be accepted as-is, but nobody has come up with an alternative approach that would be accepted.
My current thinking is that once wasi-libc has wasm32-wasip3 + pthread support, mio can treat it as just another POSIX platform via poll. That won't be particularly efficient, but has the advantage of minimal maintenance effort for the mio team.
Okay I see. This and socket2 would really unlock a lot of crates but I understand their concerns. Thank you for the response
while mio is a prerequisite, its worth noting that until shared-everything-threads or stack-switching wasm standard proposals stabilize, it won't be possible to make a fully functional port of tokio to webassembly, because tokio::task::spawn_blocking requires some sort of stack switching or thread creation primitive that webassembly does not have.
Pat Hickey said:
shared-everything-threads or stack-switching wasm standard proposals
or the cooperative multi-threading support coming in WASIp3, which is already implemented in Wasmtime.
and which @Sy Brand is adding support for in wasi-libc.
oh! right, thank you. I forgot about that
Awesome, will keep a lookout for it. For my usecase I figured I would be able to get away with current_thread but aligning with the current tokio socket api would be really cool as well.
Looking forward to preview 3
some use cases may get away with spawn_blocking being unimplemented!() but its use is a pretty infectious assumption of many tokio-dependent crates (e.g. reqwest)
Ah I see! Okay I will wait patiently. Thank you again
Also don't know if its appropriate to share here but started working on an async runtime last year. Pretty barebones right now but makes me really excited about preview 3. Uses a lot of poll mechanics right now
https://tangled.org/staticanxiety.tngl.sh/tiny-wasm-async-runtime for anyone even interested
this is cool!!!!
Thank you so much!
what are you doing with it? having fun, or for some purpose?
Mostly just having fun with it. After Yoshua's post and reading a bit of smol I was really interested into seeing how they work. Once spawn is implemented, I would love to have multiple threads running, I think it would be really interesting
you're not wrong!
Last updated: Jan 29 2026 at 13:25 UTC