Skip to content

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

41 Commits

Folders and files

Repository files navigation

Range Watch

A wazero host module, ABI and guest SDK providing byteinterval support for WASI modules.

Host Module

Go Reference Go Report Card Go Coverage

First register the host module with the runtime

import (
    "github.com/tetratelabs/wazero"
    "github.com/tetratelabs/wazero/imports/wasi_snapshot_preview1"

    "github.com/pantopic/ext-range-watch/host-wazero"
)

func main() {
    ctx := context.Background()
    r := wazero.NewRuntimeWithConfig(ctx, wazero.NewRuntimeConfig())
    wasi_snapshot_preview1.MustInstantiate(ctx, r)

    module := wazero_range_watch.New()
    module.Register(ctx, r)

    // ...
}

Guest SDK (Go)

Go Reference Go Report Card

Then you can import the guest SDK into your WASI module to emit range watch events from WASI.

package main

import (
    "github.com/pantopic/ext-range-watch/sdk-go"
)

func main() {}

//export test
func test() {
    rangewatch.Emit(12345, [][]byte{
        []byte(`test-100`),
        []byte(`test-200`),
        []byte(`test-300`),
    })
}

This is useful for emitting watch events from WASM state machines.

Roadmap

This project is in alpha. Breaking API changes should be expected until Beta.

  • v0.0.x - Alpha
    • Stabilize API
  • v0.x.x - Beta
    • Finalize API
    • Test in production
  • v1.x.x - General Availability
    • Proven long term stability in production

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages