Implement nested instance exports for components (#4364)
This commit adds support to Wasmtime for components which themselves export instances. The support here adds new APIs for how instance exports are accessed in the embedding API. For now this is mostly just a first-pass where the API is somewhat confusing and has a lot of lifetimes. I'm hoping that over time we can figure out how to simplify this but for now it should at least be expressive enough for exploring the exports of an instance.
This commit is contained in:
@@ -193,7 +193,7 @@ impl<T> WastContext<T> {
|
||||
// function from one instance and put it into the linker
|
||||
// (must go through the host right now).
|
||||
let mut linker = self.component_linker.instance(name.name())?;
|
||||
for (name, module) in instance.modules(&self.store) {
|
||||
for (name, module) in instance.exports(&mut self.store).root().modules() {
|
||||
linker.module(name, module)?;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user