Skip to content

Commit 80d9ffa

Browse files
authored
Fix Tinygo instructions (#540)
1 parent 7ab30c4 commit 80d9ffa

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ e.g. Java, Kotlin, Clojure, Scala, etc.
305305

306306
Go code can be compiled for the `wasm32-wasi` target using the [TinyGo](https://tinygo.org/) compiler. For example, the following command compiles `main.go` to a wasm modules with WASI support:
307307

308-
`tinygo build -target -target=wasi main.go`
308+
`tinygo build -target=wasi main.go`
309309

310310
> Note: the current TinyGo bindgen only supports TinyGo version v0.27.0 or later.
311311
@@ -353,9 +353,9 @@ This can then be compiled with `tinygo` and assembled into a component with:
353353

354354
```sh
355355
go generate # generate bindings for Go
356-
tinygo build -target=wasi --out main.wasm my-component.go # compile
357-
wasm-tools component embed --world world ./wit main.wasm > main.embed.wasm # create a component
358-
wasm-tools component new main.embed.wasm -o main.component.wasm
356+
tinygo build -target=wasi -o main.wasm my-component.go # compile
357+
wasm-tools component embed --world host ./wit main.wasm -o main.embed.wasm # create a component
358+
wasm-tools component new main.embed.wasm --adapt wasi_snapshot_preview1.wasm -o main.component.wasm
359359
wasm-tools validate main.component.wasm --features component-model
360360
```
361361

0 commit comments

Comments
 (0)