Skip to content

Fails to compile with go run but succeeds with go build #41

@chris-aeviator

Description

@chris-aeviator

concerning /reactr/hello

 go run -tags wasmedge main.go
# github.com/suborbital/reactr/rwasm/runtime/wasmedge
/home/korny/go/pkg/mod/github.com/suborbital/reactr@v0.12.1-0.20211208141943-8e8dcbbda027/rwasm/runtime/wasmedge/builder.go:43:17: undefined: wasmedge.NewWasiImportObject
/home/korny/go/pkg/mod/github.com/suborbital/reactr@v0.12.1-0.20211208141943-8e8dcbbda027/rwasm/runtime/wasmedge/builder.go:50:20: store.FindFunction undefined (type *wasmedge.Store has no field or method FindFunction)
/home/korny/go/pkg/mod/github.com/suborbital/reactr@v0.12.1-0.20211208141943-8e8dcbbda027/rwasm/runtime/wasmedge/builder.go:52:39: cannot use "_start" (type string) as type *wasmedge.Function in argument to executor.Invoke
/home/korny/go/pkg/mod/github.com/suborbital/reactr@v0.12.1-0.20211208141943-8e8dcbbda027/rwasm/runtime/wasmedge/builder.go:56:15: store.FindFunction undefined (type *wasmedge.Store has no field or method FindFunction)
/home/korny/go/pkg/mod/github.com/suborbital/reactr@v0.12.1-0.20211208141943-8e8dcbbda027/rwasm/runtime/wasmedge/builder.go:58:39: cannot use "init" (type string) as type *wasmedge.Function in argument to executor.Invoke
/home/korny/go/pkg/mod/github.com/suborbital/reactr@v0.12.1-0.20211208141943-8e8dcbbda027/rwasm/runtime/wasmedge/builder.go:72:40: undefined: wasmedge.ImportObject
/home/korny/go/pkg/mod/github.com/suborbital/reactr@v0.12.1-0.20211208141943-8e8dcbbda027/rwasm/runtime/wasmedge/builder.go:100:13: undefined: wasmedge.NewImportObject
/home/korny/go/pkg/mod/github.com/suborbital/reactr@v0.12.1-0.20211208141943-8e8dcbbda027/rwasm/runtime/wasmedge/host_function.go:27:26: undefined: wasmedge.ImportObject
/home/korny/go/pkg/mod/github.com/suborbital/reactr@v0.12.1-0.20211208141943-8e8dcbbda027/rwasm/runtime/wasmedge/wasmedge.go:13:11: undefined: wasmedge.ImportObject
/home/korny/go/pkg/mod/github.com/suborbital/reactr@v0.12.1-0.20211208141943-8e8dcbbda027/rwasm/runtime/wasmedge/wasmedge.go:19:44: cannot use fn (type string) as type *wasmedge.Function in argument to w.executor.Invoke
/home/korny/go/pkg/mod/github.com/suborbital/reactr@v0.12.1-0.20211208141943-8e8dcbbda027/rwasm/runtime/wasmedge/wasmedge.go:19:44: too many errors

a simple go build on the other hand compiles a binary that runs my rust-wasm code successfully.

go version go1.17.1 linux/amd64
wasmedge version 0.10.0
arch linux

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