Skip to content

Adjust target feature instructions for Wasm threading #88

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

Merged
merged 2 commits into from
Mar 30, 2025

Conversation

PgBiel
Copy link
Contributor

@PgBiel PgBiel commented Mar 30, 2025

Based on findings from godot-rust/gdext#1105 and godot-rust/gdext#1107, I propose:

  1. Suggesting removing -Ctarget-features=+atomics when compiling a nothreads build, to ensure std is compiled without multi-threading (using polyfills for threading APIs).
  2. Suggesting not adding the +mutable-globals target feature anymore in any wasm builds, as it appears to be stable and enabled by default now, per https://doc.rust-lang.org/1.85.1/rustc/platform-support/wasm32-unknown-unknown.html#enabled-webassembly-features
  3. Tentatively suggesting removing the +bulk-memory target feature as well. In principle, some error messages from emscripten suggest to me that +atomics is sufficient here, as removing this flag made my rather simple test project (with async signals for fancier testing) work all the same. However, let's keep an eye on this in case someone has a problem with this.
  4. Updating some minor things

Copy link
Member

@Bromeon Bromeon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot! Good to know that the usage of flags gets simpler with more recent emcc/rustc versions 👍

@Bromeon Bromeon added the enhancement Ongoing improvements to readability, flow, etc. label Mar 30, 2025
@Bromeon Bromeon merged commit 3d94a66 into godot-rust:master Mar 30, 2025
4 checks passed
@Bromeon
Copy link
Member

Bromeon commented Mar 30, 2025

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Ongoing improvements to readability, flow, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants