Open
Description
Repro
https://github.com/estk/hotswap-example
The error
wac plug --plug types.wasm salutation.wasm -o tysal.wasm
error: encoding produced a component that failed validation
Caused by:
instance not valid to be used as export (at offset 0x36d3bf)
Why this is surprising to me
Since the user-interface
interface is local to the hotswap::salutation package and the plugged world types
exports the user-interface
interface, I would have thought that the imports were satisfied and that the underlying types in user-interface
would be automatically re-exported.
WIT at a glance
In the salutation package we have the following:
package hotswap:salutation@0.1.0;
interface salutation {
use user-interface.{user};
variant formal-honorific {
sir,
maam,
sir-maam,
custom(string)
}
get-formal-honorific: func(u: user) -> formal-honorific;
greet: func(u: user) -> string;
}
world app {
import user-interface;
export salutation;
}
...
interface salutation {
use user-interface.{user};
variant formal-honorific {
sir,
maam,
sir-maam,
custom(string)
}
get-formal-honorific: func(u: user) -> formal-honorific;
greet: func(u: user) -> string;
}
world app {
import user-interface;
export salutation;
}
Metadata
Metadata
Assignees
Labels
No labels