Add unwinder_private_data_size for wasm64 target#156573
Conversation
|
rustbot has assigned @Mark-Simulacrum. Use Why was this reviewer chosen?The reviewer was selected based on:
|
There was a problem hiding this comment.
Cc @hoodmane you might be interested in that sort of issue.
| #[cfg(all(target_arch = "wasm32", target_os = "emscripten"))] | ||
| pub const unwinder_private_data_size: usize = 20; |
There was a problem hiding this comment.
| #[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; |
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. |
|
any news on this? |
|
Hey @Mark-Simulacrum, Are there any news to this? If you need any further explanation let me know. Thanks |
|
Please either merge this or my solution #156912 |
|
@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). |
|
@bors squash msg="Add unwinder_private_data_size for wasm64 target" |
This comment has been minimized.
This comment has been minimized.
|
🔨 2 commits were squashed into aa5b5a2. This pull request was unapproved. |
|
@bors r+ rollup |
Add unwinder_private_data_size for wasm64 target Fixes missing unwinder_private_data_size for the wasm64 architecture
Add unwinder_private_data_size for wasm64 target Fixes missing unwinder_private_data_size for the wasm64 architecture
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)
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
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)
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)
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].
Fixes missing unwinder_private_data_size for the wasm64 architecture