Skip to content

Releases: wapc/wapc-go

wazero beta

31 Aug 12:50
6f8fc25
Compare
Choose a tag to compare
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

19 Aug 01:20
fb3f00b
Compare
Choose a tag to compare

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

17 Aug 20:31
e96daa5
Compare
Choose a tag to compare

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

15 Jul 01:13
cda7048
Compare
Choose a tag to compare
v0.4.4

Updates for the latest version of as-guest. (#33)

Version bumps

29 May 22:01
Compare
Choose a tag to compare
v0.4.3

Updating dependencies

Close returns error

17 May 12:52
31aa7a4
Compare
Choose a tag to compare
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

02 Apr 01:06
531235a
Compare
Choose a tag to compare

What's Changed

Full Changelog: v0.4.0...v0.4.1

v0.4.0

30 Mar 15:33
bb50f05
Compare
Choose a tag to compare

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

28 Dec 02:11
9a6a729
Compare
Choose a tag to compare

Guest call error handling fix (#11)

Upgrading to wasmer-go 1.0.4

11 Nov 16:07
57b2e30
Compare
Choose a tag to compare
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]>