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
GOARCH=wasm tinygo build -tags wasm -x -o plugin.wasm -scheduler=none -target=wasi
package command-line-arguments
imports github.com/user.name/python-embed/internal/python-libs/data: build constraints exclude all Go files in /Users/user.name/go/src/github.com/user.name/python-embed/internal/python-libs/data
make: *** [wasm] Error 1
I've looked through the files in the data directory and i can't see a constraint that would explicitly cause this - would you have any ideas?
If i put a file in the data folder like
package data
func HelloWorld() string {
return "hello world"
}
and then compile I get
/usr/local/go/src/internal/cpu/cpu_wasm.go:7:7: CacheLinePadSize redeclared in this block
/usr/local/go/src/internal/cpu/cpu_arm.go:7:7: other declaration of CacheLinePadSize
/usr/local/go/src/internal/cpu/cpu_wasm.go:9:6: doinit redeclared in this block
/usr/local/go/src/internal/cpu/cpu_arm.go:21:6: other declaration of doinit
which seems odd as I'm on OSX but it allows a file to be compiled in the dir which exposes this issue...
The text was updated successfully, but these errors were encountered:
I have no experience with Tiny Go...but it looks like you're trying to compile to wasm, which is not supported at the moment. go-embed-python relies on python binaries and python code being packaged that are compatible with the target platform that your binary gets compiled for. These binaries are then executed via os/exec, which is not supported in Tiny Go. Even if it would be supported, there is currently no wasm build of Python that could be used in go-embed-python (this might change in the future, but there is a lot missing for this to be practical).
gotcha. Makes sense. If you hear of any changes, please let me know!
Basically I was hoping to write plugins for Go and then allow those plugins to be written (mainly) in python. I may however still be able to do it if the host application processes the python and not the plugin.
Hey @codablock - i thought as we had solved the other ticket for all intent and purposes, and this isn't related, i'd ask in a new issue.... 😁
I want to compile with Tiny Go,
However this results in
I've looked through the files in the data directory and i can't see a constraint that would explicitly cause this - would you have any ideas?
If i put a file in the data folder like
and then compile I get
which seems odd as I'm on OSX but it allows a file to be compiled in the dir which exposes this issue...
The text was updated successfully, but these errors were encountered: