Skip to content
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

WASI support #1346

Closed
mankinskin opened this issue Aug 23, 2020 · 11 comments
Closed

WASI support #1346

mankinskin opened this issue Aug 23, 2020 · 11 comments

Comments

@mankinskin
Copy link

In an effort to make tokio compatible with wasm32-wasi (tokio-rs/tokio#1597), it might make sense to make this crate WASI compatible aswell.

@Thomasdezeeuw
Copy link
Collaborator

I have an old tree: https://github.com/Thomasdezeeuw/mio/tree/wasm32-wasi, but its not functional and I don't have time to work on this.

@Thomasdezeeuw
Copy link
Collaborator

@mankinskin #1395.

@mankinskin
Copy link
Author

@Thomasdezeeuw I have no experience in this codebase whatsoever so unfortunately I can't really help with this on the spot..

@Thomasdezeeuw
Copy link
Collaborator

Closing this due to lack of interest.

@ranile
Copy link

ranile commented Nov 6, 2021

Can you clarify what you mean by lack of interest? As far as I can tell, this issue is blocked by missing WASI API (implementation: WebAssembly/WASI#312)

Mio can't implement socket connections until it is supported by the platform. I don't know of anything else that Mio can implement which is supported by WASI today

@Thomasdezeeuw
Copy link
Collaborator

Can you clarify what you mean by lack of interest? As far as I can tell, this issue is blocked by missing WASI API (implementation: WebAssembly/WASI#312)

Mio can't implement socket connections until it is supported by the platform. I don't know of anything else that Mio can implement which is supported by WASI today

It's true that Mio couldn't support socket creation, but as far as I can tell it is possible to pass a socket "from the outside" to wasm and use it from there. For example sock_recv has been part of the WASI API for a while. Mio can also already (sort of) implement Poll using poll_oneof. So an experimental implementation of parts of Mio is possible.

Re: lack of interest. This issue has seen very little activity and I know of no development effort to port Mio (except of my own, linked previously).

@xpepermint
Copy link

Is this permanently closed?

@Thomasdezeeuw
Copy link
Collaborator

@xpepermint no this issue just hasn't seen any real activity so that's why I closed it. We're still open to supporting WASM/WASI.

@dicej
Copy link

dicej commented Sep 5, 2024

FWIW, rust-lang/rust#129638 adds support for wasm32-wasip2 sockets, which includes a much broader range of features than WASIp1 did, including the ability to make outgoing connections, bind, accept, etc.

While testing early, pre-release versions of WASIp2, I created https://github.com/dicej/wasi-sockets-tests, based on experimental forks of Rust, mio, tokio, and tokio-postgres. Once Rust has full wasm32-wasip2 socket support, it would be great to follow up with mio and tokio support. I'd be happy to update my mio fork, clean it up, and open a PR if appropriate.

Should we reopen this issue? Or else open a new one specifically about WASIp2?

@Thomasdezeeuw
Copy link
Collaborator

Prs would be welcome. We do have to ensure that we don't break support for preview 1 though.

@dicej
Copy link

dicej commented Oct 9, 2024

#1836

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants