File tree Expand file tree Collapse file tree
component-model/src/language-support Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -97,11 +97,11 @@ The `adder.exports.go` file contains the exported functions that need to be impl
9797package main
9898
9999import (
100- " example.com/internal/example/component/example "
100+ " example.com/internal/docs/adder/adder "
101101)
102102
103103func init () {
104- example .Exports .Add = func (x int32 , y int32 ) int32 {
104+ adder .Exports .Add = func (x int32 , y int32 ) int32 {
105105 return x + y
106106 }
107107}
@@ -120,7 +120,7 @@ We can build our component using TinyGo by specifying the wit-package to be `add
120120Under the hood, TinyGo invokes ` wasm-tools ` to embed the WIT file to the module and componentize it.
121121
122122``` console
123- $ tinygo build -target=wasip2 -o add.wasm --wit-package add.wit --wit-world adder main.go
123+ $ tinygo build -target=wasip2 -o add.wasm --wit-package docs:adder@0.1.0.wasm --wit-world adder main.go
124124```
125125
126126We now have an add component that satisfies our ` adder ` world, exporting the ` add ` function, which
You can’t perform that action at this time.
0 commit comments