-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Description
Problem
Multiple Rust WebAssembly component *_host targets have target triple mismatch issues during CI builds, causing compilation failures across the codebase.
Errors
Linux:
error[E0461]: couldn't find crate `hello_component_bindings` with expected target triple x86_64-unknown-linux-gnu
--> examples/basic/src/lib.rs:4:5
|
4 | use hello_component_bindings::exports::hello::interfaces::greeting::Guest;
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: the following crate versions were found:
crate `hello_component_bindings`, target triple wasm32-wasip2
macOS:
error[E0461]: couldn't find crate `example_component_bindings` with expected target triple aarch64-apple-darwin
--> examples/wasm_signing/src/lib.rs:7:5
|
7 | use example_component_bindings::exports::example::signature::demo::{
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: the following crate versions were found:
crate `example_component_bindings`, target triple wasm32-wasip2
Root Cause
Systematic cross-compilation configuration issue affecting all *_host targets where:
- Host targets expect platform-specific triples (
x86_64-unknown-linux-gnu,aarch64-apple-darwin) - Available crates are compiled for
wasm32-wasip2 - Rust toolchain configuration mismatch between host and WASM builds
Affected Targets
//test_wit_deps/consumer:consumer_component_wasm_lib_release_host//examples/basic:hello_component_wasm_lib_release_host//examples/wasm_signing:example_component_wasm_lib_release_host- Likely other
*_hosttargets throughout the codebase
Current Workaround
Excluded all identified problematic *_host targets from CI builds on both Linux and macOS.
Proposed Solution
Fix Rust toolchain configuration for proper cross-compilation support:
- Review
rust_wasm_component_bindgenrule implementation for host/WASM target handling - Ensure proper Rust transitions for host vs WASM builds
- Configure dependency resolution to provide correct target triples
- May need separate binding generation for host vs WASM targets
Impact
- Multiple test and example targets excluded from CI but core functionality works
- Cross-compilation needs comprehensive fix for production use
- Pattern suggests systematic issue in Rust WebAssembly component toolchain
Priority
Medium-High - affects multiple examples and tests, indicates broader toolchain issue
Metadata
Metadata
Assignees
Labels
No labels