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 trying to create a "test.wasm" file such that "PingTheServer" function inside the main.go file makes a http GET request using the standard builtin http library and then another go program uses the wasm file as a plugin to load it and execute the function.
main.go file for the plugin:
package main
import (
"net/http"
)
//export PingTheServerfuncPingTheServer() int {
r, _:=http.Get("http://127.0.0.1:8000/test-from-plugin.go")
returnr.StatusCode
}
funcmain() {}
None Scheduler with -scheduler=none flag to tinyGo during compilation:
/usr/lib/go-1.21/src/net/http/client.go:405:2: attempted to start a goroutine without a scheduler
/usr/lib/go-1.21/src/net/http/h2_bundle.go:7283:4: attempted to start a goroutine without a scheduler
/usr/lib/go-1.21/src/net/http/h2_bundle.go:7276:4: attempted to start a goroutine without a scheduler
/usr/lib/go-1.21/src/net/http/h2_bundle.go:900:3: attempted to start a goroutine without a scheduler
/usr/lib/go-1.21/src/net/http/h2_bundle.go:855:2: attempted to start a goroutine without a scheduler
/usr/lib/go-1.21/src/net/http/h2_bundle.go:8254:2: attempted to start a goroutine without a scheduler
/usr/lib/go-1.21/src/net/http/h2_bundle.go:9960:2: attempted to start a goroutine without a scheduler
/usr/lib/go-1.21/src/net/http/h2_bundle.go:7469:2: attempted to start a goroutine without a scheduler
/usr/lib/go-1.21/src/net/http/h2_bundle.go:7843:2: attempted to start a goroutine without a scheduler
/usr/lib/go-1.21/src/net/http/transport.go:1448:3: attempted to start a goroutine without a scheduler
/usr/lib/go-1.21/src/net/http/transport.go:1436:3: attempted to start a goroutine without a scheduler
/usr/lib/go-1.21/src/net/http/transport.go:1061:5: attempted to start a goroutine without a scheduler
/usr/lib/go-1.21/src/net/http/transport.go:1551:2: attempted to start a goroutine without a scheduler
/usr/lib/go-1.21/src/net/http/socks_bundle.go:45:3: attempted to start a goroutine without a scheduler
/usr/lib/go-1.21/src/net/http/transport.go:1715:3: attempted to start a goroutine without a scheduler
/usr/lib/go-1.21/src/net/http/transport.go:1776:2: attempted to start a goroutine without a scheduler
/usr/lib/go-1.21/src/net/http/transport.go:1612:5: attempted to start a goroutine without a scheduler
/usr/lib/go-1.21/src/net/http/transport.go:1505:5: attempted to start a goroutine without a scheduler
/usr/lib/go-1.21/src/net/http/transfer.go:208:2: attempted to start a goroutine without a scheduler
/usr/lib/go-1.21/src/crypto/tls/conn.go:1527:3: attempted to start a goroutine without a scheduler
/usr/lib/go-1.21/src/context/context.go:504:2: attempted to start a goroutine without a scheduler
/usr/lib/go-1.21/src/time/sleep.go:176:2: attempted to start a goroutine without a scheduler
Tasks scheduler with -scheduler=tasks flag or Async scheduler with -scheduler=asyncify flag have same error message:
Summary
I am trying to create a "test.wasm" file such that "PingTheServer" function inside the main.go file makes a http GET request using the standard builtin http library and then another go program uses the wasm file as a plugin to load it and execute the function.
main.go file for the plugin:
Compiling the module with:
And finally, running the WASM code using runner.go as:
Additional details
I tried the different scheduler options from https://tinygo.org/docs/reference/usage/important-options/ like
none
andtasks
but none of them worked.-scheduler=none
flag to tinyGo during compilation:-scheduler=tasks
flag or Async scheduler with-scheduler=asyncify
flag have same error message:My questions are :
The text was updated successfully, but these errors were encountered: