Repository navigation
Conversation
madsmtm
force-pushed
the
wasm64-emscripten
branch
from
October 5, 2026 13:44
d765a6b to
cc8a826
Compare
madsmtm
commented
Oct 5, 2026
Member
Author
|
CC also @guybedford and @daxpedda |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Member
|
Edit: wait I think I misread. Sorry. |
5 tasks
juntyr
reviewed
Oct 6, 2026
| [`wasm32-unknown-unknown`](./wasm32-unknown-unknown.md) target may be better | ||
| suited for you. However, [`wasm32-unknown-unknown`](./wasm32-unknown-unknown.md) | ||
| does not (easily) support interop with C/C++ code. Please refer to the | ||
| [wasm-bindgen](https://crates.io/crates/wasm-bindgen) crate in case you want to |
Contributor
There was a problem hiding this comment.
Why is this gone?
Member
Author
There was a problem hiding this comment.
I removed the:
Please refer to the wasm-bindgen crate in case you want to interoperate with JavaScript with this target.
Because it's already discussed in the wasm32-unknown-unknown docs (and fits better there IMO). I can add it back if you want?
madsmtm
force-pushed
the
wasm64-emscripten
branch
from
October 6, 2026 08:59
455576e to
0e351f6
Compare
madsmtm
marked this pull request as ready for review
October 6, 2026 09:02
Collaborator
|
These commits modify compiler targets. |
This comment has been minimized.
This comment has been minimized.
madsmtm
force-pushed
the
wasm64-emscripten
branch
from
October 6, 2026 10:47
0e351f6 to
cad8cdc
Compare
JonathanBrouwer
added a commit
to JonathanBrouwer/rust
that referenced
this pull request
Oct 6, 2026
…crichton Use `target_family = "wasm"` instead of `target_arch = "wasm32"` This slightly improves support for the WASM64 architecture. Concretely, `./x doc library --target wasm64-unknown-unknown` now succeeds. There shouldn't be any functional differences in this PR (the changes to `library/std/src/os/fd/*` were already cfg-gated out on `wasm64-unknown-unknown`, and the rest is gated by `cfg(doc)`), but the changes may become relevant if we get [more Wasm64 targets in the future](rust-lang#163808).
madsmtm
force-pushed
the
wasm64-emscripten
branch
from
October 6, 2026 16:18
cad8cdc to
f26d0d0
Compare
JonathanBrouwer
added a commit
to JonathanBrouwer/rust
that referenced
this pull request
Oct 7, 2026
…crichton Use `target_family = "wasm"` instead of `target_arch = "wasm32"` This slightly improves support for the WASM64 architecture. Concretely, `./x doc library --target wasm64-unknown-unknown` now succeeds. There shouldn't be any functional differences in this PR (the changes to `library/std/src/os/fd/*` were already cfg-gated out on `wasm64-unknown-unknown`, and the rest is gated by `cfg(doc)`), but the changes may become relevant if we get [more Wasm64 targets in the future](rust-lang#163808).
JonathanBrouwer
added a commit
to JonathanBrouwer/rust
that referenced
this pull request
Oct 7, 2026
…crichton Use `target_family = "wasm"` instead of `target_arch = "wasm32"` This slightly improves support for the WASM64 architecture. Concretely, `./x doc library --target wasm64-unknown-unknown` now succeeds. There shouldn't be any functional differences in this PR (the changes to `library/std/src/os/fd/*` were already cfg-gated out on `wasm64-unknown-unknown`, and the rest is gated by `cfg(doc)`), but the changes may become relevant if we get [more Wasm64 targets in the future](rust-lang#163808).
JonathanBrouwer
added a commit
to JonathanBrouwer/rust
that referenced
this pull request
Oct 7, 2026
…crichton Use `target_family = "wasm"` instead of `target_arch = "wasm32"` This slightly improves support for the WASM64 architecture. Concretely, `./x doc library --target wasm64-unknown-unknown` now succeeds. There shouldn't be any functional differences in this PR (the changes to `library/std/src/os/fd/*` were already cfg-gated out on `wasm64-unknown-unknown`, and the rest is gated by `cfg(doc)`), but the changes may become relevant if we get [more Wasm64 targets in the future](rust-lang#163808).
rust-bors Bot
pushed a commit
that referenced
this pull request
Oct 8, 2026
Rollup merge of #163794 - madsmtm:target_family_wasm, r=alexcrichton Use `target_family = "wasm"` instead of `target_arch = "wasm32"` This slightly improves support for the WASM64 architecture. Concretely, `./x doc library --target wasm64-unknown-unknown` now succeeds. There shouldn't be any functional differences in this PR (the changes to `library/std/src/os/fd/*` were already cfg-gated out on `wasm64-unknown-unknown`, and the rest is gated by `cfg(doc)`), but the changes may become relevant if we get [more Wasm64 targets in the future](#163808).
github-actions Bot
pushed a commit
to rust-lang/rustc-dev-guide
that referenced
this pull request
Oct 10, 2026
Use `target_family = "wasm"` instead of `target_arch = "wasm32"` This slightly improves support for the WASM64 architecture. Concretely, `./x doc library --target wasm64-unknown-unknown` now succeeds. There shouldn't be any functional differences in this PR (the changes to `library/std/src/os/fd/*` were already cfg-gated out on `wasm64-unknown-unknown`, and the rest is gated by `cfg(doc)`), but the changes may become relevant if we get [more Wasm64 targets in the future](rust-lang/rust#163808).
bjorn3
pushed a commit
to rust-lang/rustc_codegen_cranelift
that referenced
this pull request
Oct 12, 2026
Use `target_family = "wasm"` instead of `target_arch = "wasm32"` This slightly improves support for the WASM64 architecture. Concretely, `./x doc library --target wasm64-unknown-unknown` now succeeds. There shouldn't be any functional differences in this PR (the changes to `library/std/src/os/fd/*` were already cfg-gated out on `wasm64-unknown-unknown`, and the rest is gated by `cfg(doc)`), but the changes may become relevant if we get [more Wasm64 targets in the future](rust-lang/rust#163808).
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add a new Emscripten target that uses 64-bit WebAssembly memories. This is a mix between
wasm64-unknown-unknownandwasm32-unknown-emscripten.libcPR: rust-lang/libc#5611Per the process for proposing new tier 3 targets:
r? compiler_leads
We can do an MCP if you want, but I felt this was uncontroversial enough to not really warrant it?
Testing
There's currently 113 test failures for the existing 32-bit Emscripten target, in the second commit I've fixed the tests that were wasm32/wasm64-specific, such that the same amount of tests are failing on this new 64-bit target (the rest of the tests can be fixed later).
Tier 3 target requirements
@hoodmane has volunteered to maintain the target alongside
wasm32-unknown-emscripten.The target uses a similar naming scheme as the 32-bit target (
wasm32-unknown-unknown).Similar to
wasm64-unknown-emscripten, thisThe requirements are the same as for
wasm32-unknown-unknown, namely none.Understood.
Understood.
The stdlib support is very close to that of the 32-bit target, so I don't foresee a huge maintenance burden here.
The documentation is mostly the same as for the 32-bit target.
Understood.
Understood.
It does.