Stream: git-wasmtime

Topic: wasmtime / Issue #1476 No apparent way to specify imports...


view this post on Zulip Wasmtime GitHub notifications bot (Apr 06 2020 at 23:55):

autodidaddict opened Issue #1476:

Looking at the create_wasi_instance function, it doesn't accept a list of imports. While the main use case for WASI might be to access the low-level syscalls supported by the interface, we should still be able to build WASI modules that import from the runtime host. The ability to specify imports for a WASI module is a feature that's available on other runtimes.

Is there a way using existing public functions to configure imports for a WASI module?

view this post on Zulip Wasmtime GitHub notifications bot (Apr 06 2020 at 23:58):

peterhuene commented on Issue #1476:

Accidental transfer of this issue, sorry about that.

I'm going to close this as fixed with the latest API. It is now quite simple to define a WASI implementation with the Linker and have host functions that either provide non-WASI imports or override WASI imports with customized implementation.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 06 2020 at 23:58):

peterhuene closed Issue #1476:

Looking at the create_wasi_instance function, it doesn't accept a list of imports. While the main use case for WASI might be to access the low-level syscalls supported by the interface, we should still be able to build WASI modules that import from the runtime host. The ability to specify imports for a WASI module is a feature that's available on other runtimes.

Is there a way using existing public functions to configure imports for a WASI module?

view this post on Zulip Wasmtime GitHub notifications bot (Apr 07 2020 at 00:00):

peterhuene edited a comment on Issue #1476:

Accidental transfer of this issue, sorry about that.

I'm going to close this as fixed with the latest API. It is now quite simple to define a WASI implementation with the Linker and have host functions that either provide non-WASI imports or override WASI imports with customized implementation.

See the linking example for an idea of how that might work. You would link in the WASI instance or define additional host functions with Linker::define.

Please reopen if you feel this issue was closed in error.


Last updated: Oct 23 2024 at 20:03 UTC