(
&self,
store: &mut Store<T>,
instance: &Instance,
index: ComponentExportIndex,
)
| 58 | } |
| 59 | |
| 60 | async fn initialize_component<T: Send>( |
| 61 | &self, |
| 62 | store: &mut Store<T>, |
| 63 | instance: &Instance, |
| 64 | index: ComponentExportIndex, |
| 65 | ) -> wasmtime::Result<()> { |
| 66 | let init_func = instance |
| 67 | .get_typed_func::<(), ()>(&mut *store, index) |
| 68 | .expect("checked by `validate_init_func`"); |
| 69 | init_func |
| 70 | .call_async(&mut *store, ()) |
| 71 | .await |
| 72 | .with_context(|| format!("the initialization function trapped"))?; |
| 73 | |
| 74 | Ok(()) |
| 75 | } |
| 76 | } |
| 77 | |
| 78 | /// Implementation of [`ComponentInstanceState`] backed by Wasmtime. |
no test coverage detected