File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
component-model/src/language-support Expand file tree Collapse file tree 1 file changed +3
-3
lines changed 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
97
97
package main
98
98
99
99
import (
100
- " example.com/internal/example/component/example "
100
+ " example.com/internal/docs/adder/adder "
101
101
)
102
102
103
103
func init () {
104
- example .Exports .Add = func (x int32 , y int32 ) int32 {
104
+ adder .Exports .Add = func (x int32 , y int32 ) int32 {
105
105
return x + y
106
106
}
107
107
}
@@ -120,7 +120,7 @@ We can build our component using TinyGo by specifying the wit-package to be `add
120
120
Under the hood, TinyGo invokes ` wasm-tools ` to embed the WIT file to the module and componentize it.
121
121
122
122
``` 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:[email protected] --wit-world adder main.go
124
124
```
125
125
126
126
We 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