Skip to content

Conversation

@avrabe
Copy link
Contributor

@avrabe avrabe commented Nov 13, 2025

Summary

Add rust-objcopy and wasm-component-ld to the rustc_lib filegroup in repository_utils.bzl. These binaries are present in recent rustc distributions (wasm-component-ld since 1.82.0, rust-objcopy since 1.84.0) but were not previously declared.

Changes

  • Binary Declaration: Add rust-objcopy{binary_ext} and wasm-component-ld{binary_ext} to the rustc_lib filegroup glob patterns

Context

On Windows, Bazel copies files into the sandbox rather than symlinking, so only explicitly listed files are available. This caused wasm32-wasip2 builds to fail with linker 'wasm-component-ld.exe' not found.

On Linux/macOS, the issue was masked by symlink-based sandboxing which allowed rustc to access unlisted files in the same directory.

Adds `rust-objcopy` and `wasm-component-ld` to the rustc_lib filegroup
in repository_utils.bzl. These binaries are present in recent rustc
distributions (wasm-component-ld since 1.82.0, rust-objcopy since 1.84.0)
but were not declared in the filegroup.

On Windows, Bazel copies files into the sandbox rather than symlinking,
so only explicitly listed files are available. This caused wasm32-wasip2
builds to fail with "linker 'wasm-component-ld.exe' not found".

On Linux/macOS, the issue was masked by symlink-based sandboxing which
allowed access to unlisted files in the same directory.
@avrabe avrabe force-pushed the fix/add-missing-rustc-binaries branch from 738871d to b715cc7 Compare November 13, 2025 05:52
avrabe added a commit to pulseengine/rules_wasm_component that referenced this pull request Nov 13, 2025
Testing PR bazelbuild/rules_rust#3727
which adds wasm-component-ld.exe and rust-objcopy.exe to rustc_lib filegroup.

This should fix Windows wasm32-wasip2 builds by ensuring the linker is
copied into the Bazel sandbox.

Issue: avrabe/rules_rust#8
avrabe added a commit to pulseengine/rules_wasm_component that referenced this pull request Nov 14, 2025
Testing PR bazelbuild/rules_rust#3727
which adds wasm-component-ld.exe and rust-objcopy.exe to rustc_lib filegroup.

This should fix Windows wasm32-wasip2 builds by ensuring the linker is
copied into the Bazel sandbox.

Issue: avrabe/rules_rust#8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant