forked from bytecodealliance/wasmtime
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable the new preview1 implementation by default (bytecodealliance#7365
) Currently Wasmtime has two implementations of the `wasi_snapshot_preview1` set of APIs. The now-historical implementation lives in the `wasi-common` crate and the more recent implementation lives in the `wasmtime-wasi` crate. The main difference is that the `wasmtime-wasi` implementation is based on the implementation of preview2, meaning that the preview1 implementation is a shim in that direction. Additionally currently the preview2 implementation of preview1 is accessible via the `-Spreview2` flag on the CLI. This commit updates the interpretation of the `-Spreview2` flag and the defaults around which implementation to choose. By default the preview1-built-on-preview2 implementation (the new `wasmtime-wasi` implementation) is selected now. This means that the `wasi-common` implementation is disabled by default. There are still two use cases to keep running the `wasi-common` implementation, however: * When running modules that import from `wasi_unstable`, the "snapshot" before `wasi_snapshot_preview1`, currently `wasi-common` is required. The shims to implement `wasi_unstable` have not yet been implemented in the `wasmtime-wasi` crate. * When running with WASI threads (`-Sthreads`) the preview2 implementation does not work. This is because the preview2 implementation expects mutable access to the table which is not granted when threads are enabled. Tests using `wasi_unstable` now pass `-Spreview2=n` to explicitly request the old `wasi-common` implementation. Additionally the `wasi-common` implementation is still selected by default when `-Sthreads` is passed (enabling the WASI threads proposal).
- Loading branch information
1 parent
2340dff
commit 5ea563f
Showing
3 changed files
with
38 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters