-
Notifications
You must be signed in to change notification settings - Fork 122
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
fix: enable wasip2 feature for wasm32-wasip2 target #305
Conversation
cdmurph32
commented
Nov 5, 2024
- wasip2 will require +nightly until wasip2 target should not conditionally feature gate stdlib APIs rust-lang/rust#130323 is resolved and/or std::os::wasip2 is available in stable.
- Support was added to rustix for version 0.38.39 fix: enable wasip2 feature for wasm32-wasip2 target bytecodealliance/rustix#1205
From my reading of that issue, this isn't the correct fix. See servo/rust-url#983. Am I missing something? |
In that particular case, @brooksmtownsend was able to get around the use of std::os::wasi::prelude::OsStrExt. This PR allows for the use of rustix for the wasm32-wasip2 target. There probably isn't a way to have this crate work for that target without rustix for the numerous uses of |
Yeah just to add a bit of context, my original PR to "url" was to enable compilation when wasm32-wasip2 was only on the nightly channel, then my follow up PR was to remove the use of those unstable APIs by using essentially equivalent APIs. Put another way, this crate currently does not compile to wasm32-wasip2. This PR would enable compilation on the nightly channel, and then enabling compilation on stable would either require a Rust change in the feature gating or to replace the use of those unstable APIs |
I see... Let's put this behind a new |
23b9be7
to
a9649aa
Compare
I forgot all about the existing "nightly" feature. I've pushed a change that merges "unstable" into "nightly", does this work for you? |
Looks good. Builds on my machine. 😄 |
Hm. It looks like cargo-wasi was just broken by rust-lang/compiler-team#607. |
|
5e82b26
to
6119ce1
Compare
Signed-off-by: Colin Murphy <cdmurph32@gmail.com>
Signed-off-by: Colin Murphy <cdmurph32@gmail.com>
I forgot we had this feature already (and it's already being used for wasi-related things anyways).
6119ce1
to
02887e9
Compare
3.14 published |
- wasip2 will require +nightly until rust-lang/rust#130323 is resolved and/or std::os::wasip2 is available in stable. - Support was added to rustix for version 0.38.39 bytecodealliance/rustix#1205 - Support was added to tempfile for version 3.14 Stebalien/tempfile#305
- wasip2 will require +nightly until rust-lang/rust#130323 is resolved and/or std::os::wasip2 is available in stable. - Support was added to rustix for version 0.38.39 bytecodealliance/rustix#1205 - Support was added to tempfile for version 3.14 Stebalien/tempfile#305