Releases: wapc/wapc-go
Releases · wapc/wapc-go
wazero beta
Updates to supported Go version and wazero beta (#38) Per go support policy, the floor version is 1.18 now. This also moves to wazero's 1.0.0-beta.2 tag. Signed-off-by: Adrian Cole <[email protected]> Signed-off-by: Adrian Cole <[email protected]>
wazero compiler cache to disk flag
wapc-guest-tinygo
wapc-guest-tinygo now allows wapc.ConsoleLogger
, which uses the host functions implemented by wapc-go.
wazero engine
wazero now adds an experimental context flag that can be used to cache the compiler cache to disk, helping with cold start performance.
Ex.
engine := wazero.Engine()
ctx := experimental.WithCompilationCacheDirName(context.Background(), "/home/me/.cache/wazero")
module, err := engine.New(ctx, host, guest, &wapc.ModuleConfig{
Logger: wapc.PrintlnLogger,
Stdout: os.Stdout,
Stderr: os.Stderr,
})
--snip--
Module configuration using `io.Writer` and customization of the wazero runtime
The New
method of Engine
is now:
New(ctx context.Context, host HostCallHandler, guest []byte, config *ModuleConfig)
Where ModuleConfig is
// ModuleConfig includes parameters to Engine.New.
//
// Note: Implementations should copy fields they use instead of storing
// a reference to this type.
ModuleConfig struct {
// Logger is the logger waPC uses for `__console_log` calls
Logger Logger
// Stdout is the writer WASI uses for `fd_write` to file descriptor 1.
Stdout io.Writer
// Stderr is the writer WASI uses for `fd_write` to file descriptor 2.
Stderr io.Writer
}
Additionally, the wazero
engine can be customized using EngineWithRuntime
.
// NewRuntime returns a new wazero runtime which is called when the New method
// on wapc.Engine is called. The result is closed upon wapc.Module Close.
type NewRuntime func(context.Context) (wazero.Runtime, error)
// EngineWithRuntime allows you to customize or return an alternative to
// DefaultRuntime,
func EngineWithRuntime(newRuntime NewRuntime) wapc.Engine {
return &engine{newRuntime: newRuntime}
}
Version bumps
v0.4.4 Updates for the latest version of as-guest. (#33)
Version bumps
v0.4.3 Updating dependencies
Close returns error
Makes Close return error and fixes some safety issues (#28) * Makes Close return error and fixes some safety issues This makes Close more safe in the non-wazero impls by using atomic instead of field check to see if a function should proceed. This also makes "error ignoring" a decision of the caller of `Close` vs an implicit decision inside an implementation. Signed-off-by: Adrian Cole <[email protected]> * uses 2.0 flag from #27 Signed-off-by: Adrian Cole <[email protected]> * much better Signed-off-by: Adrian Cole <[email protected]> * fixes README Signed-off-by: Adrian Cole <[email protected]> * bump Signed-off-by: Adrian Cole <[email protected]>
v0.4.1
What's Changed
- wazero: updates to latest API by @codefromthecrypt in #21
- wazero: WithFeatureSignExtensionOps by @pkedy in #22
Full Changelog: v0.4.0...v0.4.1
v0.4.0
This release includes multi engine support for the following Wasm runtimes:
Name | Usage | Package |
---|---|---|
wasmer-go | wasmer.Engine() |
github.com/wasmerio/wasmer-go |
wasmtime-go | wasmtime.Engine() |
github.com/bytecodealliance/wasmtime-go |
wazero | wazero.Engine() |
github.com/tetratelabs/wazero |
Note: There is a small change that is not backward compatible. You must instantiate the engine from its package. See the README for further details and an example.
v0.3.2
Upgrading to wasmer-go 1.0.4
Revamping Tests (#9) * Adding a test GH action * Making linters happy * Renaming go tests * Fixing branch configuration * Adding some sub-tests * Updating Tests * Little better coverage * Tidy Go mod * Updating Makefile and adding rust * Cleaning up comments a bit * s/an/and/ * Updated to TinyGo v0.20.0 Co-authored-by: Phil Kedy <[email protected]>