Fixes build after 76c0bfc33f

Signed-off-by: Adrian Cole <adrian@tetrate.io>
This commit is contained in:
Crypt Keeper
2022-03-02 13:44:26 +08:00
committed by GitHub
parent 76c0bfc33f
commit 979b86d502
2 changed files with 4 additions and 3 deletions

View File

@@ -34,7 +34,7 @@ There are two runtime configurations supported in wazero, where _JIT_ is default
1. _Interpreter_: a naive interpreter-based implementation of Wasm virtual machine. Its implementation doesn't have any platform (GOARCH, GOOS) specific code, therefore _interpreter_ engine can be used for any compilation target available for Go (such as `riscv64`).
2. _JIT_: compiles WebAssembly modules, generates the machine code, and executing it all at runtime. Currently wazero implements the JIT compiler for `amd64` and `arm64` target. Generally speaking, _JIT engine_ is faster than _Interpreter_ by order of magnitude. However, the implementation is immature and has a bunch of aspects that could be improved (for example, it just does a singlepass compilation and doesn't do any optimizations, etc.). Please refer to [internal/wasm/jit/RATIONALE.md](internal/wasm/jit/RATIONALE.md) for the design choices and considerations in our JIT engine.
Both of configurations passes 100% of [WebAssembly spec test suites]((https://github.com/WebAssembly/spec/tree/wg-1.0/test/core)) (on supported platforms).
Both configurations pass 100% of [WebAssembly spec test suites]((https://github.com/WebAssembly/spec/tree/wg-1.0/test/core)) (on supported platforms).
| Engine | Usage| amd64 | arm64 | others |
|:---:|:---:|:---:|:---:|:---:|

View File

@@ -3,7 +3,8 @@
package wazero
// NewRuntimeConfig returns NewRuntimeConfigJIT
// NewRuntimeConfig returns NewRuntimeConfigInterpreter
// TODO: switch back to NewRuntimeConfigJIT https://github.com/tetratelabs/wazero/issues/308
func NewRuntimeConfig() *RuntimeConfig {
return NewRuntimeConfigJIT()
return NewRuntimeConfigInterpreter()
}