Files
Stephan Renatus 968220f6bd wasm-sdk: use wasmtime.Linker for resolving imports, only have one wasmtime.Engine instance per pool (#3764)
* wasm-sdk: use wasmtime.Linker for resolving imports

No functional change here, but this is easier to read and understand:
anything the module needs, the linker will try to satisfy using the
defined module/name entries ("env.memory", "env.opa_println", etc).

* wasm-sdk: only use one *wasmtime.Engine instance

This should bring us a little more in-line with the
https://docs.rs/wasmtime/0.29.0/wasmtime/#example-architecture

> When the server starts, we’ll start off by creating an Engine (and
> maybe tweaking Config settings if necessary). This Engine will be
> the only engine for the lifetime of the server itself.
> Next, we can compile our WebAssembly.

Signed-off-by: Stephan Renatus <stephan.renatus@gmail.com>
2021-08-27 20:00:30 +02:00
..