Take a component with the following wit:
package component:comp;
world my-world {
use my-interface.{my-resource};
export my-func: func(r: my-resource);
}
interface my-interface {
resource my-resource {}
}
And the following wac file:
package example:composition;
let comp = new example:comp {...};
export comp.my-func;
You will get the following panic:
thread 'main' panicked at crates/wac-parser/src/resolution/encoding.rs:191:38:
internal error: entered unreachable code: resource cannot be imported at the top-level
Importing resources is indeed not possible, but it seems the transitive dependency on my-interface gets lost along the way.