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

libcurl for networking (not just HTTP) in WASI #107

Open
alterstep opened this issue Oct 5, 2019 · 5 comments
Open

libcurl for networking (not just HTTP) in WASI #107

alterstep opened this issue Oct 5, 2019 · 5 comments
Labels
feature-request Requests for new WASI APIs

Comments

@alterstep
Copy link

curl is used everywhere, and supports many protocols: HTTP, HTTP/2, even HTTP/3 already but also LDAP, SMTP, SFTP, SMB... all the possible features and options of these protocols are available.
curl has a generic, very stable interface for all these protocols. It can be blocking or non-blocking. Wrappers for many programming languages exist. curl developer works at Mozilla.
WASI cannot do networking at the moment. Has curl integration in WASI been considered?

@sunfishcode
Copy link
Member

From my perspective, talking about a possible WASI HTTP API proposal doesn't preclude talking about a possible WASI sockets API proposal too. It may even turn out to be possible to implement a WASI HTTP API as a wasm module on top of a WASI sockets API, perhaps even using curl compiled to wasm to do it. That's an appealing approach for engines that want to keep their surface area minimal. At the same time, some engines may want to implement HTTP natively. They may even be able to use curl in their implementation if they want to :-).

@alterstep
Copy link
Author

libcurl compiled to wasm would be good! But every single application shouldn't have to bundle a copy of libcurl. It would be better if we can assume that the functions are always available, like WASI.

@zlonqi
Copy link

zlonqi commented Jan 7, 2022

libcurl compiled to wasm would be good! But every single application shouldn't have to bundle a copy of libcurl. It would be better if we can assume that the functions are always available, like WASI.

Hi, I would like to know how to compile libcurl to wasm library. Could I trouble you to give some tips? Thank you very much.

@sunfishcode
Copy link
Member

At present, WASI has no networking APIs, so libcurl is unlikely to be compilable. Various groups are working on this, so it's possible there will be other answers in the future.

@badeend
Copy link
Contributor

badeend commented Jan 25, 2022

To those who are interested; I've created a draft proposal at: https://github.com/badeend/WASI-Networking

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Requests for new WASI APIs
Projects
None yet
Development

No branches or pull requests

4 participants