Support WASI snapshot0 in the C API.

This commit adds support for snapshot0 in the WASI C API.

A name parameter was added to `wasi_instance_new` to accept which WASI module
is being instantiated.

Additionally, the C# API now supports constructing a WASI instance based on the
WASI module name.

Fixes #1221.
This commit is contained in:
Peter Huene
2020-03-20 16:47:25 -07:00
parent 853d5f304d
commit 0d5d63fdb1
12 changed files with 613 additions and 120 deletions

View File

@@ -936,6 +936,7 @@ namespace Wasmtime
[DllImport(LibraryName)]
public static extern WasiInstanceHandle wasi_instance_new(
StoreHandle store,
[MarshalAs(UnmanagedType.LPUTF8Str)] string name,
WasiConfigHandle config,
out IntPtr trap
);