When wasmd is used as a library, the project won't compile without cgo enabled:
../../../go/pkg/mod/github.com/!cosm!wasm/wasmvm@v1.1.1/internal/api/mocks.go:195:2: undefined: GasMeter
../../../go/pkg/mod/github.com/!cosm!wasm/wasmvm@v1.1.1/internal/api/mocks.go:196:20: undefined: Gas
../../../go/pkg/mod/github.com/!cosm!wasm/wasmvm@v1.1.1/internal/api/mocks.go:200:11: undefined: Gas
../../../go/pkg/mod/github.com/!cosm!wasm/wasmvm@v1.1.1/internal/api/mocks.go:201:11: undefined: Gas
../../../go/pkg/mod/github.com/!cosm!wasm/wasmvm@v1.1.1/internal/api/mocks.go:205:28: undefined: Gas
../../../go/pkg/mod/github.com/!cosm!wasm/wasmvm@v1.1.1/internal/api/mocks.go:212:38: undefined: Gas
../../../go/pkg/mod/github.com/!cosm!wasm/wasmvm@v1.1.1/internal/api/mocks.go:216:32: undefined: Gas
../../../go/pkg/mod/github.com/!cosm!wasm/wasmvm@v1.1.1/internal/api/mocks.go:230:42: undefined: Gas
../../../go/pkg/mod/github.com/!cosm!wasm/wasmvm@v1.1.1/internal/api/mocks.go:329:7: undefined: KVStore
../../../go/pkg/mod/github.com/!cosm!wasm/wasmvm@v1.1.1/internal/api/mock_failure.go:15:27: undefined: GoAPI
../../../go/pkg/mod/github.com/!cosm!wasm/wasmvm@v1.1.1/internal/api/mocks.go:329:7: too many errors
With this PR, I added build flags and decoupled the types to make the compiler happy.
When wasmd is used as a library, the project won't compile without cgo enabled:
With this PR, I added build flags and decoupled the types to make the compiler happy.