Skip to content

Commit ba1cf38

Browse files
committed
docs: update Windows support with discovery that wasm-component-ld.exe exists
MAJOR UPDATE: After downloading Windows rustc distribution, confirmed that wasm-component-ld.exe IS PRESENT (5.1MB) at: rustc/lib/rustlib/x86_64-pc-windows-msvc/bin/wasm-component-ld.exe The real problem is a rules_rust/Bazel sandboxing issue - rustc can't access its own lib/rustlib directory on Windows. Updated documentation to: - Correct root cause (not missing tool, but sandbox issue) - Recommend filing issue with bazelbuild/rules_rust - Provide specific details for reproduction - Update status from 'Rust toolchain issue' to 'rules_rust integration issue' All Windows platform detection work in rules_wasm_component is complete. The blocker is now upstream in rules_rust.
1 parent b927804 commit ba1cf38

File tree

1 file changed

+26
-10
lines changed

1 file changed

+26
-10
lines changed

docs/WINDOWS_SUPPORT.md

Lines changed: 26 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
| **WASI SDK** |||| Full support with .exe extensions |
88
| **C/C++ Components** |||| All toolchain binaries work correctly |
99
| **TinyGo** |||| Cross-platform compatibility verified |
10-
| **Rust wasm32-wasip2** |||| Blocked by missing wasm-component-ld.exe |
10+
| **Rust wasm32-wasip2** |||| Blocked by Bazel/rules_rust sandbox issue |
1111
| **JavaScript** |||| Node.js and jco work on Windows |
1212
| **WASM Tools** |||| All validation and composition tools work |
1313

@@ -23,14 +23,20 @@ error: linker `wasm-component-ld.exe` not found
2323
= note: program not found
2424
```
2525

26-
### Root Cause
26+
### Root Cause (DISCOVERED)
2727

28-
The `wasm-component-ld` linker is required for the wasm32-wasip2 target. This tool:
29-
- Wraps `wasm-ld` (LLVM's WASM linker)
30-
- Converts core WASM modules to WASM components
31-
- Is distributed as part of the Rust compiler toolchain
28+
**✅ The tool EXISTS!** We downloaded and analyzed the Windows rustc distribution:
3229

33-
**Problem**: The Windows rustc distribution does not include `wasm-component-ld.exe`, or it's not in the expected PATH.
30+
```
31+
File: rustc-1.90.0-x86_64-pc-windows-msvc.tar.xz
32+
Location: rustc/lib/rustlib/x86_64-pc-windows-msvc/bin/wasm-component-ld.exe
33+
Size: 5.1MB
34+
Status: Present in official Rust distribution
35+
```
36+
37+
**The real problem**: rustc can't access its own `lib/rustlib/{target}/bin/` directory in the Bazel sandbox on Windows.
38+
39+
This is a **rules_rust/Bazel integration issue**, not a Rust toolchain issue.
3440

3541
### What We Fixed
3642

@@ -91,10 +97,20 @@ Track these Rust issues:
9197

9298
### Future Resolution
9399

100+
**UPDATE**: The tool IS distributed! ~~Issue #1 below is complete~~.
101+
94102
This will be resolved when:
95-
1. Rust officially distributes `wasm-component-ld.exe` with Windows rustc
96-
2. Or rustup includes it when installing the wasm32-wasip2 target
97-
3. Or Bazel rules_rust provides a hermetic wasm-component-ld for Windows
103+
1. ~~Rust officially distributes `wasm-component-ld.exe` with Windows rustc~~ ✅ Already done!
104+
2. **rules_rust exposes the rustlib directory properly on Windows** (file issue with bazelbuild/rules_rust)
105+
3. Or a workaround is implemented to explicitly pass the full path to the linker
106+
107+
### Recommended Action
108+
109+
File an issue with `bazelbuild/rules_rust` including:
110+
- Title: "Windows: rustc can't access lib/rustlib/{target}/bin/ in Bazel sandbox for wasm32-wasip2"
111+
- Details: Tool exists at `rustc/lib/rustlib/x86_64-pc-windows-msvc/bin/wasm-component-ld.exe` but rustc reports "not found"
112+
- Test case: rules_wasm_component Windows BCR test failure
113+
- Request: Investigation of Windows-specific sandbox configuration
98114

99115
## Testing on Windows
100116

0 commit comments

Comments
 (0)