Skip to content

Compiling with tiny Go #23

Open
Open
@amlwwalker

Description

@amlwwalker

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,

GOARCH=wasm tinygo build -tags wasm -x -o plugin.wasm -scheduler=none -target=wasi           

However this results in

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...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions