|
|
| Linker (Engine &engine) |
| | Creates a new linker which will instantiate in the given engine.
|
| |
| void | allow_shadowing (bool allow) |
| |
|
Result< std::monostate > | define (Store::Context cx, std::string_view module, std::string_view name, const Extern &item) |
| | Defines the provided item into this linker with the given name.
|
| |
| Result< std::monostate > | define_wasi () |
| |
| Result< std::monostate > | define_instance (Store::Context cx, std::string_view name, Instance instance) |
| |
| TrapResult< Instance > | instantiate (Store::Context cx, const Module &m) |
| |
| Result< std::monostate > | module (Store::Context cx, std::string_view name, const Module &m) |
| |
| std::optional< Extern > | get (Store::Context cx, std::string_view module, std::string_view name) |
| |
| template<typename F , std::enable_if_t< std::is_invocable_r_v< Result< std::monostate, Trap >, F, Caller, Span< const Val >, Span< Val > >, bool > = true> |
| Result< std::monostate > | func_new (std::string_view module, std::string_view name, const FuncType &ty, F &&f) |
| |
| template<typename F , std::enable_if_t< WasmHostFunc< F >::Params::valid, bool > = true, std::enable_if_t< WasmHostFunc< F >::Results::valid, bool > = true> |
| Result< std::monostate > | func_wrap (std::string_view module, std::string_view name, F &&f) |
| |
| Result< Func > | get_default (Store::Context cx, std::string_view name) |
| |
|
Result< std::monostate > | define_unknown_imports_as_traps (Module &module) |
| | Defines any import of module previously unknown to this linker as a trap.
|
| |
|
Result< std::monostate > | define_unknown_imports_as_default_values (Store::Context cx, Module &module) |
| | Defines any import of module previously unknown to this linker as the "default" value for that import, for example a function that returns zeros.
|
| |
Helper class for linking modules together with name-based resolution.
This class is used for easily instantiating Modules by defining names into the linker and performing name-based resolution during instantiation. A Linker can also be used to link in WASI functions to instantiate a module.