Skip to content

Add unwinder_private_data_size for wasm64 target#156573

Merged
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
richArved:patch-1
Jun 7, 2026
Merged

Add unwinder_private_data_size for wasm64 target#156573
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
richArved:patch-1

Conversation

@richArved

Copy link
Copy Markdown
Contributor

Fixes missing unwinder_private_data_size for the wasm64 architecture

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label May 14, 2026
@rustbot

rustbot commented May 14, 2026

Copy link
Copy Markdown
Collaborator

r? @Mark-Simulacrum

rustbot has assigned @Mark-Simulacrum.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Fallback group: @Mark-Simulacrum, @jieyouxu
  • @Mark-Simulacrum, @jieyouxu expanded to Mark-Simulacrum, jieyouxu
  • Random selection from Mark-Simulacrum, jieyouxu

@daxpedda daxpedda left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Cc @hoodmane you might be interested in that sort of issue.

View changes since this review

Comment thread library/unwind/src/libunwind.rs Outdated
Comment on lines 75 to 76
#[cfg(all(target_arch = "wasm32", target_os = "emscripten"))]
pub const unwinder_private_data_size: usize = 20;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
#[cfg(all(target_arch = "wasm32", target_os = "emscripten"))]
pub const unwinder_private_data_size: usize = 20;
#[cfg(all(target_family = "wasm", target_os = "emscripten"))]
pub const unwinder_private_data_size: usize = 20;

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

done, thanks !

@daxpedda daxpedda left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

AFAICS a Wasm64 Emscripten target doesn't exist. So I'm not sure what this is supposed to fix.

View changes since this review

@richArved

Copy link
Copy Markdown
Contributor Author

AFAICS a Wasm64 Emscripten target doesn't exist. So I'm not sure what this is supposed to fix.

View changes since this review

It isn't a fix for a built-in tier target. It's for custom target specs. Changing it to target_family = "wasm" would fix the compiler error of the unwind crate because the cfg gate target_arch = "wasm32" doesn't match and the constant is missing, without affecting the existing wasm32 behavior. Also it future-proofs against any official wasm64 targets that may be added later.

@richArved

Copy link
Copy Markdown
Contributor Author

any news on this?

@richArved

Copy link
Copy Markdown
Contributor Author

Hey @Mark-Simulacrum, Are there any news to this? If you need any further explanation let me know. Thanks

@gergelyvagujhelyi

Copy link
Copy Markdown

Please either merge this or my solution #156912
I need this so I can fit an llm into memory.

@Mark-Simulacrum

Copy link
Copy Markdown
Member

@bors r+

I'll go ahead and approve this since it's for a below-tier-3 target, but it would be good to document where this value comes from (both for wasm32 and 64).

@rust-bors

rust-bors Bot commented Jun 7, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 09f39f3 has been approved by Mark-Simulacrum

It is now in the queue for this repository.

@rust-bors rust-bors Bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 7, 2026
@Mark-Simulacrum

Copy link
Copy Markdown
Member

@bors squash msg="Add unwinder_private_data_size for wasm64 target"

@rust-bors

This comment has been minimized.

@rust-bors rust-bors Bot added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Jun 7, 2026
@rust-bors

rust-bors Bot commented Jun 7, 2026

Copy link
Copy Markdown
Contributor

🔨 2 commits were squashed into aa5b5a2.

This pull request was unapproved.

@rust-bors rust-bors Bot removed the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Jun 7, 2026
@Mark-Simulacrum

Copy link
Copy Markdown
Member

@bors r+ rollup

@rust-bors

rust-bors Bot commented Jun 7, 2026

Copy link
Copy Markdown
Contributor

📌 Commit aa5b5a2 has been approved by Mark-Simulacrum

It is now in the queue for this repository.

@rust-bors rust-bors Bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jun 7, 2026
jhpratt added a commit to jhpratt/rust that referenced this pull request Jun 7, 2026
Add unwinder_private_data_size for wasm64 target

Fixes missing unwinder_private_data_size for the wasm64 architecture
jhpratt added a commit to jhpratt/rust that referenced this pull request Jun 7, 2026
Add unwinder_private_data_size for wasm64 target

Fixes missing unwinder_private_data_size for the wasm64 architecture
rust-bors Bot pushed a commit that referenced this pull request Jun 7, 2026
Rollup of 25 pull requests

Successful merges:

 - #157251 (`rust-analyzer` subtree update)
 - #157533 (Subtree sync for rustc_codegen_cranelift)
 - #154742 (Add APIs for case folding to the standard library)
 - #155144 (mir_build: Add an extra intermediate step in MIR building for patterns )
 - #156222 (Stabilize `Result::map_or_default` and `Option::map_or_default`)
 - #157016 (add `extern "tail"` calling convention)
 - #157264 (diagnostics: Fix ICE building a trait ref in method suggestions)
 - #157386 (Parse deprecated note links separately in rustc_resolve)
 - #157483 (fix windows-gnu TLS leak)
 - #157488 (compiletest: inject `#![windows_subsystem = "windows"]` to debuginfo tests on Windows)
 - #157509 (remove solaris implementation for File::lock, it has the wrong semantics)
 - #157521 (Rename `SyncView::{as_pin => as_pin_ref}`)
 - #156136 (Move tests box)
 - #156573 (Add unwinder_private_data_size for wasm64 target)
 - #156783 (docs: make `Rc::into_raw` clickable in `Rc::increment_strong_count` doc)
 - #156840 (Stabilize `PathBuf::into_string`)
 - #156936 (Remove FIXME about impl PinCoerceUnsized for UnsafePinned<T>)
 - #157365 (Revert "LLVM 23: Run AssignGUIDPass in some places")
 - #157380 (clarify compiler_fence (and fence) docs)
 - #157471 (Debug assert that parsed attributes are in the `BUILTIN_ATTRIBUTE_MAP`)
 - #157485 (Rename `errors.rs` file to `diagnostics.rs` (1/N))
 - #157494 (Convert `QueryRegionConstraint` into a struct)
 - #157526 (std tests: skip a slow test on Miri)
 - #157531 (ci: bump x86_64-gnu base image to 26.04)
 - #157556 (Add `BTree::append()` change to 1.96.0 relnotes)

Failed merges:

 - #155527 (Replace printables table with `unicode_data.rs` tables)
@rust-bors rust-bors Bot merged commit 7eeb5b9 into rust-lang:main Jun 7, 2026
12 checks passed
@rustbot rustbot added this to the 1.98.0 milestone Jun 7, 2026
rust-timer added a commit that referenced this pull request Jun 7, 2026
Rollup merge of #156573 - richArved:patch-1, r=Mark-Simulacrum

Add unwinder_private_data_size for wasm64 target

Fixes missing unwinder_private_data_size for the wasm64 architecture
pull Bot pushed a commit to asukaminato0721/rust-analyzer that referenced this pull request Jun 7, 2026
Rollup of 25 pull requests

Successful merges:

 - rust-lang/rust#157251 (`rust-analyzer` subtree update)
 - rust-lang/rust#157533 (Subtree sync for rustc_codegen_cranelift)
 - rust-lang/rust#154742 (Add APIs for case folding to the standard library)
 - rust-lang/rust#155144 (mir_build: Add an extra intermediate step in MIR building for patterns )
 - rust-lang/rust#156222 (Stabilize `Result::map_or_default` and `Option::map_or_default`)
 - rust-lang/rust#157016 (add `extern "tail"` calling convention)
 - rust-lang/rust#157264 (diagnostics: Fix ICE building a trait ref in method suggestions)
 - rust-lang/rust#157386 (Parse deprecated note links separately in rustc_resolve)
 - rust-lang/rust#157483 (fix windows-gnu TLS leak)
 - rust-lang/rust#157488 (compiletest: inject `#![windows_subsystem = "windows"]` to debuginfo tests on Windows)
 - rust-lang/rust#157509 (remove solaris implementation for File::lock, it has the wrong semantics)
 - rust-lang/rust#157521 (Rename `SyncView::{as_pin => as_pin_ref}`)
 - rust-lang/rust#156136 (Move tests box)
 - rust-lang/rust#156573 (Add unwinder_private_data_size for wasm64 target)
 - rust-lang/rust#156783 (docs: make `Rc::into_raw` clickable in `Rc::increment_strong_count` doc)
 - rust-lang/rust#156840 (Stabilize `PathBuf::into_string`)
 - rust-lang/rust#156936 (Remove FIXME about impl PinCoerceUnsized for UnsafePinned<T>)
 - rust-lang/rust#157365 (Revert "LLVM 23: Run AssignGUIDPass in some places")
 - rust-lang/rust#157380 (clarify compiler_fence (and fence) docs)
 - rust-lang/rust#157471 (Debug assert that parsed attributes are in the `BUILTIN_ATTRIBUTE_MAP`)
 - rust-lang/rust#157485 (Rename `errors.rs` file to `diagnostics.rs` (1/N))
 - rust-lang/rust#157494 (Convert `QueryRegionConstraint` into a struct)
 - rust-lang/rust#157526 (std tests: skip a slow test on Miri)
 - rust-lang/rust#157531 (ci: bump x86_64-gnu base image to 26.04)
 - rust-lang/rust#157556 (Add `BTree::append()` change to 1.96.0 relnotes)

Failed merges:

 - rust-lang/rust#155527 (Replace printables table with `unicode_data.rs` tables)
pull Bot pushed a commit to xtqqczze/rust-lang-miri that referenced this pull request Jun 8, 2026
Rollup of 25 pull requests

Successful merges:

 - rust-lang/rust#157251 (`rust-analyzer` subtree update)
 - rust-lang/rust#157533 (Subtree sync for rustc_codegen_cranelift)
 - rust-lang/rust#154742 (Add APIs for case folding to the standard library)
 - rust-lang/rust#155144 (mir_build: Add an extra intermediate step in MIR building for patterns )
 - rust-lang/rust#156222 (Stabilize `Result::map_or_default` and `Option::map_or_default`)
 - rust-lang/rust#157016 (add `extern "tail"` calling convention)
 - rust-lang/rust#157264 (diagnostics: Fix ICE building a trait ref in method suggestions)
 - rust-lang/rust#157386 (Parse deprecated note links separately in rustc_resolve)
 - rust-lang/rust#157483 (fix windows-gnu TLS leak)
 - rust-lang/rust#157488 (compiletest: inject `#![windows_subsystem = "windows"]` to debuginfo tests on Windows)
 - rust-lang/rust#157509 (remove solaris implementation for File::lock, it has the wrong semantics)
 - rust-lang/rust#157521 (Rename `SyncView::{as_pin => as_pin_ref}`)
 - rust-lang/rust#156136 (Move tests box)
 - rust-lang/rust#156573 (Add unwinder_private_data_size for wasm64 target)
 - rust-lang/rust#156783 (docs: make `Rc::into_raw` clickable in `Rc::increment_strong_count` doc)
 - rust-lang/rust#156840 (Stabilize `PathBuf::into_string`)
 - rust-lang/rust#156936 (Remove FIXME about impl PinCoerceUnsized for UnsafePinned<T>)
 - rust-lang/rust#157365 (Revert "LLVM 23: Run AssignGUIDPass in some places")
 - rust-lang/rust#157380 (clarify compiler_fence (and fence) docs)
 - rust-lang/rust#157471 (Debug assert that parsed attributes are in the `BUILTIN_ATTRIBUTE_MAP`)
 - rust-lang/rust#157485 (Rename `errors.rs` file to `diagnostics.rs` (1/N))
 - rust-lang/rust#157494 (Convert `QueryRegionConstraint` into a struct)
 - rust-lang/rust#157526 (std tests: skip a slow test on Miri)
 - rust-lang/rust#157531 (ci: bump x86_64-gnu base image to 26.04)
 - rust-lang/rust#157556 (Add `BTree::append()` change to 1.96.0 relnotes)

Failed merges:

 - rust-lang/rust#155527 (Replace printables table with `unicode_data.rs` tables)
gergelyvagujhelyi added a commit to nobodywho-ooo/nobodywho that referenced this pull request Jun 8, 2026
Adds a wasm64-unknown-emscripten build variant alongside wasm32, lifting the
4 GiB linear-memory ceiling to 16 GiB so models whose working set exceeds
4 GiB can load. Unblocked by rust-lang/rust#156573 (wasm64 unwinder, merged
2026-06-07), so -Zbuild-std compiles std for the tier-3 target on a recent
nightly with no rustlib patch.

- js/targets/wasm64-unknown-emscripten.json: custom target spec (derived from
  the built-in wasm32 spec; 64-bit pointer width, panic=abort)
- js/build.rs: arch-aware link flags (-sMEMORY64=1, 16 GiB ceiling on wasm64)
- js/scripts/build-pkg-emscripten-wasm64.sh: build-std + JSON target pipeline
- .cargo/config.toml: wasm64 target rustflags fallback
- js/tests/test_emscripten_wasm64.mjs: smoke test
- js_ci.yml: wasm64 build + test legs
- README/llm.rs: document the 16 GiB ceiling + #156573

TEMPORARY: the workspace [patch] points llama-cpp-rs and wasm-bindgen at local
clones of their wasm64-emscripten branches (build.rs -sMEMORY64; wasm-bindgen
memory64 fixes for the emscripten path). Push those branches + re-pin to drop
the [patch].
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants