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
I am implementing a simple wrapper of cel-go that can run in browser.
First I was using go, which worked just fine in terms of logic. However as soon as I moved from go to tinygo in order to optimise the file size of wasm.
I ran into this issue that I do not understand
LinkError: WebAssembly.instantiate(): Import #16 "wasi_snapshot_preview1" "fd_prestat_get": function import requires a callable
An example reproducible function for v0.39.0
import (
celgo "github.com/google/cel-go/cel"
)
funcCanRun(expressionstring) bool {
// Create a basic CEL environment for syntax checkingenv, err:=celgo.NewEnv()
iferr!=nil {
returnfalse
}
// Try to parse and check the expression_, issues:=env.Parse(expression)
ifissues!=nil&&issues.Err() !=nil {
returnfalse// Invalid syntax, but not an internal error
}
returntrue
}
I would like to know is this a problem with tinygo, a limitation or is there something missing in worker_exec.js . Is there any workaround?