reactor

command
v1.1.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 18, 2025 License: BSD-3-Clause Imports: 2 Imported by: 0

README

Reactor module example

By including this package, you'll turn your plugin into a Reactor module. This makes sure that you can use WASI (e.g. File Access) in your exported functions.

This is only required for TinyGo versions below 0.34.0 where native support for reactort-style modules was missing.To test this example, run:

tinygo build -target wasi -o reactor.wasm ./tiny_main.go
extism call ./reactor.wasm read_file --input "./test.txt" --allow-path . --wasi --log-level info
# => Hello World!

If you don't include the pacakge, you'll see this output:

extism call ./c.wasm read_file --input "./test.txt" --allow-path . --wasi --log-level info
# => 2024/01/18 20:48:48 open ./test.txt: errno 76

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL