You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
where SendMessage is one of the plugin functions that the host calls, I then want to call the logger on the host as you can see.
In my host I have
func (PluginFunctions) Log(ctx context.Context, request *interop.LogRequest) (*emptypb.Empty, error) {
// Use the host logger
log.Println("logging ", request.GetMessage())
return &emptypb.Empty{}, nil
}
where the plugin was registered with
defined as (i32, i32) -> i64 in lto.tmp
defined as (f64) -> f64 in /opt/homebrew/Cellar/tinygo/0.30.0/lib/wasi-libc/sysroot/lib/wasm32-wasi/libc.a(log.o)
Try to rename Log to HostLog or something to not interfere with log from libc (this worked with older versions of tinygo because of bug, that many other packages start to rely on it at some point).
Hi,
I have
and on compilation with
and generating my plugin with
I then have in my plugin
where
SendMessage
is one of the plugin functions that the host calls, I then want to call the logger on the host as you can see.In my host I have
tinygo build -o pkg/plugins/examples/basic.wasm -scheduler=none -target=wasi --no-debug pkg/plugins/examples/basic.go
tinygo:wasm-ld: warning: function signature mismatch: log
2024/01/11 12:04:49 error starting plugin service wasm error: unreachable
wasm stack trace:
.(main.MyPlugin).SendMessage(i32)
.plugin_service_send_message(i32,i32) i64
The text was updated successfully, but these errors were encountered: