-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Description
Summary
The build is failing because the Rust toolchain is configured for wasm32-wasip1 but the platform transition expects wasm32-wasip2.
Error
ERROR: /private/var/tmp/_bazel_r/1ca65a983d68290a99a9611f71f46bcb/external/rules_rust++rust+rust_macos_aarch64__wasm32-wasip1__stable_tools/BUILD.bazel:97:15: Linking external/rules_rust++rust+rust_macos_aarch64__wasm32-wasip1__stable_tools/librust_toolchain.a failed: (Exit 1): true failed: error executing CppArchive command (from target @@rules_rust++rust+rust_macos_aarch64__wasm32-wasip1__stable_tools//:rust_toolchain) /bin/true rcsD bazel-out/darwin_arm64-fastbuild-ST-805526428602/bin/external/rules_rust++rust+rust_macos_aarch64__wasm32-wasip1__stable_tools/librust_toolchain.a ... (remaining 2 arguments skipped)
src/main/tools/process-wrapper-legacy.cc:80: "execvp(/bin/true, ...)": No such file or directory
Problem Analysis
- Platform transition in
rust/transitions.bzlline 6 sets:"//command_line_option:platforms": "//platforms:wasm32-wasip2" - Common constants in
common/common.bzlline 4 defines:WASM_TARGET_TRIPLE = "wasm32-wasip2" - But actual build shows:
wasm32-wasip1in the error path
Expected Behavior
The Rust toolchain should be configured for wasm32-wasip2 to match the platform definitions.
Steps to Reproduce
- Use
rust_wasm_component_bindgenin a BUILD file - Build the target:
bazel build //path/to:target - Build fails with
wasm32-wasip1toolchain error
Environment
- Bazel 8.3.1
- rules_wasm_component commit: f151bef
- Platform: macOS ARM64
- rules_rust: via MODULE.bazel dependencies
Potential Fix
The platform definitions in //platforms:wasm32-wasip2 may need to be updated to properly configure the Rust toolchain for wasip2 instead of wasip1.
Metadata
Metadata
Assignees
Labels
No labels