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

Fix wasm32 with atomics #797

Merged
merged 2 commits into from
Feb 5, 2025
Merged

Conversation

bushrat011899
Copy link
Contributor

Objective

Solution

  • Include js_sys explicitly when enabling the js feature on wasm32 when compiling with the atomics target_feature enabled.
  • Fix possibly outdated code from vendoring

Notes

  • js_sys was already in the dependency graph due to wasm-bindgen, it just needed to be exposed when compiling under the conditions described in the attached issue.
  • This is not a breaking change and could be published as 1.13.1 to fix 1.13.0 failing to compile in the aforementioned conditions.

@KodrAus
Copy link
Member

KodrAus commented Feb 5, 2025

Thanks @bushrat011899 👍

I'll get this merged and released, and rejig our CI around wasm to better catch this sort of thing in the future.

Originally proposed in uuid-rs#798

Co-Authored-By: Ashley Mannix <[email protected]>
@bushrat011899
Copy link
Contributor Author

I've just copied in the CI change from #798 with you credited so this should sort out everything hopefully!

@KodrAus KodrAus merged commit f175242 into uuid-rs:main Feb 5, 2025
21 checks passed
kodiakhq bot pushed a commit to pdylanross/fatigue that referenced this pull request Feb 5, 2025
Bumps uuid from 1.12.1 to 1.13.1.

Release notes
Sourced from uuid's releases.

1.13.1
What's Changed

Fix wasm32 with atomics by @​bushrat011899 in uuid-rs/uuid#797
Prepare for 1.13.1 release by @​KodrAus in uuid-rs/uuid#799

New Contributors

@​bushrat011899 made their first contribution in uuid-rs/uuid#797

Full Changelog: uuid-rs/[email protected]
1.13.0
⚠️ Potential Breakage
This release updates our version of getrandom to 0.3 and rand to 0.9. It is a potentially breaking change for the following users:
no-std users who enable the rng feature
uuid still uses getrandom by default on these platforms. Upgrade your version of getrandom and follow its new docs on configuring a custom backend.
wasm32-unknown-unknown users who enable the rng feature without the js feature
Upgrade your version of getrandom and follow its new docs on configuring a backend.
You'll also need to enable the rng-getrandom or rng-rand feature of uuid to force it to use getrandom as its backend:
[dependencies.uuid]
version = "1.13.0"
- features = ["v4"]
+ features = ["v4", "rng-getrandom"]
[dependencies.getrandom]
version = "0.3"
If you're on wasm32-unknown-unknown and using the js feature of uuid you shouldn't see any breakage. We've kept this behavior by vendoring in getrandom's web-based backend when the js feature is enabled.
What's Changed

Update getrandom to 0.3 and rand to 0.9 by @​KodrAus in uuid-rs/uuid#793
Support forcing getrandom on wasm32-unknown-unknown without JavaScript by @​KodrAus in uuid-rs/uuid#794
Prepare for 1.13.0 release by @​KodrAus in uuid-rs/uuid#795

Full Changelog: uuid-rs/[email protected]



Commits

5421417 Merge pull request #799 from uuid-rs/cargo/1.13.1
df58674 prepare for 1.13.1 release
f175242 Merge pull request #797 from bushrat011899/wasm32_atomics
65c31b3 Include CI Update
17673a1 Fix wasm32 with atomics
1cf1433 Merge pull request #795 from uuid-rs/cargo/1.13.0
ded7a1e prepare for 1.13.0 release
6494c4b Merge pull request #794 from uuid-rs/feat/getrandom-wasm32
9e7300c fix some warnings on various feature enablement
6c155b4 work around lack of dep:x and x/y feature support in 1.63
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)
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

Successfully merging this pull request may close these issues.

Failure to compile with js feature and -C target-feature=+atomics
2 participants