Skip to content

Commit 9db3594

Browse files
h-a-n-aclaude
andauthored
refactor: remove __rust_probestack workaround (#11326)
Remove custom __rust_probestack implementation that was added as a workaround for wasmer linking issues. This cleanup removes: - compiler_builtins_probestack.rs module with custom stack probing code - Related feature flags (abi_custom) and force linking code - Probestack module exports from the compiler module 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: Claude <[email protected]>
1 parent 1058ba0 commit 9db3594

File tree

3 files changed

+0
-260
lines changed

3 files changed

+0
-260
lines changed

crates/rspack_javascript_compiler/src/compiler/compiler_builtins_probestack.rs

Lines changed: 0 additions & 237 deletions
This file was deleted.

crates/rspack_javascript_compiler/src/compiler/mod.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,5 @@
11
use std::sync::Arc;
22

3-
// Wasmer depends on the __rust_probestack symbol
4-
// This symbol is now mangled and no longer exposed (on nightly). Therefore, building wasmer fails during linking.
5-
// Added this symbol back as a workaround.
6-
// See: https://github.com/wasmerio/wasmer/issues/5610
7-
#[doc(hidden)]
8-
pub mod compiler_builtins_probestack;
9-
103
pub mod minify;
114
pub mod parse;
125
pub mod stringify;
Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,5 @@
1-
// See crates/rspack_javascript_compiler/src/compiler/compiler_builtins_probestack.rs
2-
// for the reason why this feature is needed.
3-
#![feature(abi_custom)]
4-
#![allow(internal_features)]
5-
61
pub mod ast;
72
mod compiler;
83
mod error;
94

105
pub use compiler::{JavaScriptCompiler, TransformOutput, minify, parse, transform};
11-
12-
// Force linking of probestack symbols when conditions are met
13-
// This ensures the __rust_probestack symbol is always included in the binary
14-
// See crates/rspack_javascript_compiler/src/compiler/compiler_builtins_probestack.rs
15-
#[cfg(all(
16-
not(any(windows, target_os = "cygwin")),
17-
any(target_arch = "x86_64", target_arch = "x86")
18-
))]
19-
#[used]
20-
static _FORCE_LINK_PROBESTACK: unsafe extern "custom" fn() =
21-
compiler::compiler_builtins_probestack::__rust_probestack;

0 commit comments

Comments
 (0)