bytecodealliance / bytecodealliance/go-modules

tinygo build error:package not found

Abierto
#285 4 comentarios 1 reacción 1 asignado Reclamado por @ydnar Ver en GitHub
bug
Lenguaje dominante
Go
Estrellas
148
Forks
20
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

Hi team, I am trying to follow this tutorial:https://component-model.bytecodealliance.org/language-support/go.html#4-build-the-component,
However I failed to build:

```plaintext
~/studyspace/rust/wit-test: tinygo version
tinygo version 0.34.0 darwin/arm64 (using go version go1.22.10 and LLVM version 18.1.2)
~/studyspace/rust/wit-test : wasm-tools --version
wasm-tools 1.219.1 (91be0bbc8 2024-10-10)
~/studyspace/rust/wit-test : tree .
.
├── Makefile
├── docs:adder@0.1.0.wasm
├── go.mod
├── go.sum
├── internal
│ ├── docs
│ │ └── adder
│ │ └── adder
│ │ ├── adder.exports.go
│ │ ├── adder.wasm.go
│ │ ├── adder.wit
│ │ ├── adder.wit.go
│ │ └── empty.s
│ └── wasi
│ ├── cli
│ │ ├── environment
│ │ │ ├── empty.s
│ │ │ ├── environment.wasm.go
│ │ │ └── environment.wit.go
│ │ ├── exit
│ │ │ ├── empty.s
│ │ │ ├── exit.wasm.go
│ │ │ └── exit.wit.go
│ │ ├── stderr
│ │ │ ├── empty.s
│ │ │ ├── stderr.wasm.go
│ │ │ └── stderr.wit.go
│ │ ├── stdin
│ │ │ ├── empty.s
│ │ │ ├── stdin.wasm.go
│ │ │ └── stdin.wit.go
│ │ ├── stdout
│ │ │ ├── empty.s
│ │ │ ├── stdout.wasm.go
│ │ │ └── stdout.wit.go
│ │ ├── terminal-input
│ │ │ ├── empty.s
│ │ │ ├── terminal-input.wit.go
│ │ │ └── terminalinput.wasm.go
│ │ ├── terminal-output
│ │ │ ├── empty.s
│ │ │ ├── terminal-output.wit.go
│ │ │ └── terminaloutput.wasm.go
│ │ ├── terminal-stderr
│ │ │ ├── empty.s
│ │ │ ├── terminal-stderr.wit.go
│ │ │ └── terminalstderr.wasm.go
│ │ ├── terminal-stdin
│ │ │ ├── empty.s
│ │ │ ├── terminal-stdin.wit.go
│ │ │ └── terminalstdin.wasm.go
│ │ └── terminal-stdout
│ │ ├── empty.s
│ │ ├── terminal-stdout.wit.go
│ │ └── terminalstdout.wasm.go
│ ├── clocks
│ │ ├── monotonic-clock
│ │ │ ├── empty.s
│ │ │ ├── monotonic-clock.wit.go
│ │ │ └── monotonicclock.wasm.go
│ │ └── wall-clock
│ │ ├── empty.s
│ │ ├── wall-clock.wit.go
│ │ └── wallclock.wasm.go
│ ├── filesystem
│ │ ├── preopens
│ │ │ ├── empty.s
│ │ │ ├── preopens.wasm.go
│ │ │ └── preopens.wit.go
│ │ └── types
│ │ ├── abi.go
│ │ ├── empty.s
│ │ ├── types.wasm.go
│ │ └── types.wit.go
│ ├── io
│ │ ├── error
│ │ │ ├── empty.s
│ │ │ ├── error.wit.go
│ │ │ └── ioerror.wasm.go
│ │ ├── poll
│ │ │ ├── empty.s
│ │ │ ├── poll.wasm.go
│ │ │ └── poll.wit.go
│ │ └── streams
│ │ ├── empty.s
│ │ ├── streams.wasm.go
│ │ └── streams.wit.go
│ ├── random
│ │ ├── insecure
│ │ │ ├── empty.s
│ │ │ ├── insecure.wasm.go
│ │ │ └── insecure.wit.go
│ │ ├── insecure-seed
│ │ │ ├── empty.s
│ │ │ ├── insecure-seed.wit.go
│ │ │ └── insecureseed.wasm.go
│ │ └── random
│ │ ├── empty.s
│ │ ├── random.wasm.go
│ │ └── random.wit.go
│ └── sockets
│ ├── instance-network
│ │ ├── empty.s
│ │ ├── instance-network.wit.go
│ │ └── instancenetwork.wasm.go
│ ├── ip-name-lookup
│ │ ├── abi.go
│ │ ├── empty.s
│ │ ├── ip-name-lookup.wit.go
│ │ └── ipnamelookup.wasm.go
│ ├── network
│ │ ├── abi.go
│ │ ├── empty.s
│ │ ├── network.wasm.go
│ │ └── network.wit.go
│ ├── tcp
│ │ ├── abi.go
│ │ ├── empty.s
│ │ ├── tcp.wasm.go
│ │ └── tcp.wit.go
│ ├── tcp-create-socket
│ │ ├── empty.s
│ │ ├── tcp-create-socket.wit.go
│ │ └── tcpcreatesocket.wasm.go
│ ├── udp
│ │ ├── abi.go
│ │ ├── empty.s
│ │ ├── udp.wasm.go
│ │ └── udp.wit.go
│ └── udp-create-socket
│ ├── empty.s
│ ├── udp-create-socket.wit.go
│ └── udpcreatesocket.wasm.go
├── main.go
├── wit
│ ├── add.wit
│ ├── deps
│ │ ├── cli
│ │ │ ├── command.wit
│ │ │ ├── environment.wit
│ │ │ ├── exit.wit
│ │ │ ├── imports.wit
│ │ │ ├── run.wit
│ │ │ ├── stdio.wit
│ │ │ └── terminal.wit
│ │ ├── clocks
│ │ │ ├── monotonic-clock.wit
│ │ │ ├── timezone.wit
│ │ │ ├── wall-clock.wit
│ │ │ └── world.wit
│ │ ├── filesystem
│ │ │ ├── preopens.wit
│ │ │ ├── types.wit
│ │ │ └── world.wit
│ │ ├── io
│ │ │ ├── error.wit
│ │ │ ├── poll.wit
│ │ │ ├── streams.wit
│ │ │ └── world.wit
│ │ ├── random
│ │ │ ├── insecure-seed.wit
│ │ │ ├── insecure.wit
│ │ │ ├── random.wit
│ │ │ └── world.wit
│ │ └── sockets
│ │ ├── instance-network.wit
│ │ ├── ip-name-lookup.wit
│ │ ├── network.wit
│ │ ├── tcp-create-socket.wit
│ │ ├── tcp.wit
│ │ ├── udp-create-socket.wit
│ │ ├── udp.wit
│ │ └── world.wit
│ ├── deps.lock
│ └── deps.toml
├── wkg.lock
~/studyspace/rust/wit-test: tinygo build -target=wasip2 -o add.wasm --wit-package wit/add.wit --wit-world adder main.go
error: package not found
--> wit/add.wit:3:11
|
3 | include wasi:cli/imports@0.2.0;
| ^-------
wasm-tools component embed` failed: exit status 1

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.