-
Notifications
You must be signed in to change notification settings - Fork 31
Closed
Description
I am testing working with wasm components. I have four components, A, B1, B2, C with a diamond layout.
C
|\
| \
↓ ↓
B1 B2
\ /
↓
A
The packages are as follows
A:
package example:a@0.1.0;
interface %interface {
record blob {
x: f64,
}
f-a: func(x: f64) -> blob;
}
world %world {
export %interface;
}B1:
package example:b1@0.1.0;
interface %interface {
use example:a/%interface@0.1.0.{blob};
f-b1: func(x: f64) -> blob;
}
world %world {
import example:a/%interface@0.1.0;
export %interface;
}B2:
package example:b2@0.1.0;
interface %interface {
use example:a/%interface@0.1.0.{blob};
f-b2: func(x: f64) -> blob;
}
world %world {
import example:a/%interface@0.1.0;
export %interface;
}C:
package example:c@0.1.0;
interface %interface {
f-c: func(x: f64) -> f64;
}
world %world {
import example:b1/%interface@0.1.0;
import example:b2/%interface@0.1.0;
export %interface;
}The generated bindings for C contain function f-a from A. I don't think that is correct. Is C allowed to call f-a in this example? I get that it needs the type blob, but why f-a? Isn't that an implementation detail of B1 and B2?
If this behavior is correct, how do I make importing A an implementation detail of B1 and B2? Can they still share A then?
Metadata
Metadata
Assignees
Labels
No labels