-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
feat(wasm): add support for the stable target wasm32-wasip2 #2453
base: master
Are you sure you want to change the base?
feat(wasm): add support for the stable target wasm32-wasip2 #2453
Conversation
Signed-off-by: Brooks Townsend <[email protected]> refactor(wasm): add wasm mod Signed-off-by: Brooks Townsend <[email protected]>
Signed-off-by: Brooks Townsend <[email protected]>
1379d90
to
7edd47e
Compare
Signed-off-by: Brooks Townsend <[email protected]> cleanup extraneous comment Signed-off-by: Brooks Townsend <[email protected]> feat: give back incoming body too Signed-off-by: Brooks Townsend <[email protected]> deps(url): remove patch Signed-off-by: Brooks Townsend <[email protected]>
Signed-off-by: Brooks Townsend <[email protected]> example cleanup extra blocking feature Signed-off-by: Brooks Townsend <[email protected]> use body example Signed-off-by: Brooks Townsend <[email protected]> deps(url): remove patch Signed-off-by: Brooks Townsend <[email protected]>
7edd47e
to
3b3c99e
Compare
Apologies for letting this go stale here, I haven't had the time to really shore this one up. I think there's a lot of promise in this approach, and I also don't want to overindex on supporting I think in the shorter term what would make this PR a candidate for review and merging would either be:
|
Something to call out is that at least some tokio features do break on Specifically, the use of the tokio timer seems to cause issues. You'll see that there is currently conditional compilation to keep wasm platforms from relying on Perhaps I'm lacking context and |
Fixes #2294
Depends on servo/rust-url#983This PR, in order of commits:
reqwest
in the generalwasm32
OS and thewasm32-wasip2
target (which is now a tier 2 target and Rust stable in 1.82)wasm32-wasip2
implementations forreqwest
so that you can compile WebAssembly components and make outgoing requests that compile down towasi:http
bindings- This commit also adds a patch for crates.io that depends on fix: supportwasm32-wasip2
on the stable channel servo/rust-url#983, which is why this PR is a draft. There is no significant functionality change upstream to make the wasm32-wasip2 target work for theurl
crate, just a change to remove an unstable feature flag.wasm_component
to illustrate how this crate can be used in the context of awasm32-wasip2
program.I've attempted to bring over the minimal implementations into the wasm32-wasip2 code, e.g. no multipart support, to keep the review focused and simple to start. If any of these need to be added, I'm happy to add follow-up commits after the review.