Looks up an export from the caller's module by the `name` given. This is a low-level function that's typically used to implement passing of pointers or indices between core Wasm instances, where the callee needs to consult the caller's exports to perform memory management and resolve the references. For comparison, in components, the component model handles translating arguments from one compone
(&mut self, name: &str)
| 2037 | /// It's recommended to take care when calling this API and gracefully |
| 2038 | /// handling a `None` return value. |
| 2039 | pub fn get_export(&mut self, name: &str) -> Option<Extern> { |
| 2040 | // All instances created have a `host_state` with a pointer pointing |
| 2041 | // back to themselves. If this caller doesn't have that `host_state` |
| 2042 | // then it probably means it was a host-created object like `Func::new` |
| 2043 | // which doesn't have any exports we want to return anyway. |
| 2044 | self.caller.get_export(&mut self.store, name) |
| 2045 | } |
| 2046 | |
| 2047 | /// Looks up an exported [`Extern`] value by a [`ModuleExport`] value. |
| 2048 | /// |
no outgoing calls