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.
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.None Scheduler with
-scheduler=none
flag to tinyGo during compilation:Tasks scheduler with
-scheduler=tasks
flag or Async scheduler with-scheduler=asyncify
flag have same error message:My questions are :