Renames wasi package to wasi_snapshot_preview1 (#610)

The componentized successor to wasi_snapshot_preview1 is not compatible
with the prior imports or even error numbers. Before releasing wazero
1.0 we need to change this package to reflect that WASI 2 is effectively
  a different API.

Fixes #263

Signed-off-by: Adrian Cole <adrian@tetrate.io>
This commit is contained in:
Crypt Keeper
2022-06-01 12:21:11 +08:00
committed by GitHub
parent 41a3dd341c
commit 5fae0fd76b
25 changed files with 209 additions and 211 deletions

View File

@@ -111,7 +111,7 @@ type Runtime interface {
// defer r.CloseWithExitCode(ctx, 2) // This closes everything this Runtime created.
//
// // Everything below here can be closed, but will anyway due to above.
// _, _ = wasi.InstantiateSnapshotPreview1(ctx, r)
// _, _ = wasi_snapshot_preview1.InstantiateSnapshotPreview1(ctx, r)
// mod, _ := r.InstantiateModuleFromCode(ctx, source)
CloseWithExitCode(ctx context.Context, exitCode uint32) error