Skip to content

Commit 44b2861

Browse files
committed
Fix wasm example
`main` is not called anymore with a WASI reactor, means we have to use `init()` and provide an empty `main()` instead. Signed-off-by: Sascha Grunert <[email protected]>
1 parent 25d9391 commit 44b2861

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

plugins/wasm/plugin.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,12 @@ import (
2424

2525
type plugin struct{}
2626

27-
func main() {
27+
func init() {
2828
api.RegisterPlugin(&plugin{})
2929
}
3030

31+
func main() {}
32+
3133
func log(ctx context.Context, msg string) {
3234
api.NewHostFunctions().Log(ctx, &api.LogRequest{
3335
Msg: "WASM: " + msg,

0 commit comments

Comments
 (0)