GetExport attempts to find an export on this instance by `name` May return `nil` if this instance has no export named `name`
(store Storelike, name string)
| 90 | // |
| 91 | // May return `nil` if this instance has no export named `name` |
| 92 | func (i *Instance) GetExport(store Storelike, name string) *Extern { |
| 93 | var item C.wasmtime_extern_t |
| 94 | ok := C.wasmtime_instance_export_get( |
| 95 | store.Context(), |
| 96 | &i.val, |
| 97 | C._GoStringPtr(name), |
| 98 | C._GoStringLen(name), |
| 99 | &item, |
| 100 | ) |
| 101 | runtime.KeepAlive(store) |
| 102 | runtime.KeepAlive(name) |
| 103 | if ok { |
| 104 | return mkExtern(&item) |
| 105 | } |
| 106 | return nil |
| 107 | } |
| 108 | |
| 109 | // GetFunc attempts to find a function on this instance by `name`. |
| 110 | // |