Hey there, I defined a record
in a wit file, imported by two other wit files, one to produce and one to consume. The problem is that these two bindings have different mods, and so they don't work together. Is it possible to unify them by generating a common mod library to be consumed by bindings that uses this library?
wit_bindgen_rust::import!("a.wit");
wit_bindgen_rust::import!("consume.wit");
fn main() -> Result<()> {
let common = a::get_common_a();
consume::consume_common(common);
Ok(())
}
error[E0308]: mismatched types
--> src/main.rs:8:29
|
8 | consume::consume_common(common);
| ^^^^^^ expected struct `consume::Common`, found struct `a::Common`
Ah I just saw this issue, which effectively is talking about the same thing as I asked here.
Yes. That's unfortunately not supported yet, though it's something we know we'll need.
(deleted)
Last updated: Dec 23 2024 at 12:05 UTC