|
Wasmtime
|
Class representing an instantiated WebAssembly component. More...
#include <instance.hh>
Public Member Functions | |
| Instance (const wasmtime_component_instance_t &inst) | |
| Constructs an Instance from the underlying C API struct. | |
| std::optional< ExportIndex > | get_export_index (Store::Context cx, const ExportIndex *instance, std::string_view name) const |
| Looks up an exported item from this instance by name, returning the index at which it can be found. More... | |
| std::optional< Func > | get_func (Store::Context cx, const ExportIndex &index) const |
| Looks up an exported function by its export index. | |
| const wasmtime_component_instance_t * | capi () const |
| Returns the underlying C API pointer. | |
Class representing an instantiated WebAssembly component.
|
inline |
Looks up an exported item from this instance by name, returning the index at which it can be found.
The returned ExportIndex references the underlying item within this instance which can then be accessed via that index specifically. The instance provided as an argument to this function is the containing export instance, if any, that name is looked up under.