package
1.0.6
Repository: https://github.com/extism/go-pdk.git
Documentation: pkg.go.dev

# 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.

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