-
Notifications
You must be signed in to change notification settings - Fork 217
Add wasm32v1-none
Support
#828
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
Conversation
Thanks for working on this @bushrat011899! Just so I follow properly, we treat the |
Correct, the only difference between The |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @bushrat011899! This looks great to me.
Bumps uuid from 1.16.0 to 1.17.0. Release notes Sourced from uuid's releases. v1.17.0 What's Changed Added convenience implementation TryFrom for std by @Nahuel-M in uuid-rs/uuid#819 Update OSX builds to arm by @KodrAus in uuid-rs/uuid#825 Replace derive(Hash) with manual impl in Uuid by @diopoex in uuid-rs/uuid#824 Add wasm32v1-none Support by @bushrat011899 in uuid-rs/uuid#828 Prepare for 1.17.0 release by @KodrAus in uuid-rs/uuid#829 New Contributors @Nahuel-M made their first contribution in uuid-rs/uuid#819 @diopoex made their first contribution in uuid-rs/uuid#824 Full Changelog: uuid-rs/[email protected] Commits 2fd9b61 Merge pull request #829 from uuid-rs/cargo/v1.17.0 ed0d385 prepare for 1.17.0 release c54cadc Merge pull request #828 from bushrat011899/wasm32v1-none 625d769 Fix typo in MVP Web CI 9d638e0 Add MVP Web CI Task 83dc528 Add wasm32v1-none support 5fbd843 Merge pull request #824 from diopoex/main 6635ae4 Merge pull request #825 from uuid-rs/ci/aarch64-apple-darwin b2370f2 update toolchain for outdated job c74ad33 update OSX builds to arm Additional commits viewable in compare view Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase. Dependabot commands and options You can trigger Dependabot actions by commenting on this PR: @dependabot rebase will rebase this PR @dependabot recreate will recreate this PR, overwriting any edits that have been made to it @dependabot merge will merge this PR after your CI passes on it @dependabot squash and merge will squash and merge this PR after your CI passes on it @dependabot cancel merge will cancel a previously requested merge and block automerging @dependabot reopen will reopen this PR if it is closed @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Objective
uuid
has support forno_std
, and support forwasm32-unknown-unknown
, but it currently doesn't have support for the alternativewasm32v1-none
. Attempting to compileuuid
with thev4
andjs
features onwasm32v1-none
causes a compilation error due togetrandom
.Solution
Based on
wasm32v1-none
andwasm32-unknown-unknown
documentation, and this compilation failure condition ingetrandom
, the configuration conditionuuid
should use for possibly-web Wasm is:That is, 32-bit Wasm with either an unknown OS (
wasm32-unknown-unknown
) or none (wasm32v1-none
). Thetarget_vendor
condition is omitted based on the recommendations from the official Rust documentation linked above.Notes
std
features fromjs-sys
andwasm-bindgen
, and moved them intouuid/std
. This may not be required, aswasm32-unknown-unknown
still compiles without thesestd
features enabled, but doing so reduces the chance of downstream issues.-Z avoid-dev-deps
to test the target locally.