Skip to content

Commit 383f89a

Browse files
committed
fix: resolve Rust WIT binding generation provider forwarding issue
Fix critical Rust WebAssembly component build failures affecting both Linux and macOS CI environments by correcting WIT binding provider forwarding in rust_wasm_component_bindgen. **Root Cause:** The _wasm_rust_library_bindgen transition rule introduced in recent changes was not properly forwarding Rust library providers, causing the generated {name}_bindings targets to be inaccessible to dependent Rust components. **Impact:** - Rust compiler errors: "use of unresolved module or unlinked crate" - Linux linker failures due to missing binding dependencies - macOS undefined symbol errors for WIT-generated functions - All rust_wasm_component_bindgen targets failing across CI **Solution:** Replace the problematic transition rule with a direct alias to the working {name}_bindings_wasm_base target. This restores immediate functionality while preserving the TODO to fix the underlying provider forwarding logic. **Verification:** - //examples/cli_tool_example:file_processor_component builds successfully - //test/integration:basic_component builds successfully - Generated bindings properly accessible via {name}_bindings targets This resolves the immediate CI blocking issues while maintaining the improved WIT binding architecture introduced in recent refactoring.
1 parent 3b44995 commit 383f89a

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

rust/rust_wasm_component_bindgen.bzl

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -384,10 +384,11 @@ def rust_wasm_component_bindgen(
384384
visibility = ["//visibility:private"],
385385
)
386386

387-
# Create a WASM-transitioned version of the WASM bindings library
388-
_wasm_rust_library_bindgen(
387+
# Create an alias to the WASM bindings library
388+
# TODO: Fix _wasm_rust_library_bindgen provider forwarding and re-enable transition
389+
native.alias(
389390
name = bindings_lib,
390-
target = ":" + bindings_lib_wasm_base,
391+
actual = ":" + bindings_lib_wasm_base,
391392
visibility = ["//visibility:private"],
392393
)
393394

0 commit comments

Comments
 (0)