Skip to content

Commit ba9f4ad

Browse files
committed
feat: document how to use go vet
Signed-off-by: Andrew Steurer <94206073+asteurer@users.noreply.github.com>
1 parent dc6e0f6 commit ba9f4ad

File tree

3 files changed

+15
-3
lines changed

3 files changed

+15
-3
lines changed

examples/wasip1/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
### Prerequisites
66

7-
- [**componentize-go**](https://github.com/bytecodealliance/componentize-go) - v0.3.0
7+
- [**componentize-go**](https://github.com/bytecodealliance/componentize-go) - Latest version
88
- [**go**](https://go.dev/dl/) - v1.25+
99
- [**wasmtime**](https://github.com/bytecodealliance/wasmtime) - v43.0.0
1010

examples/wasip2/README.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
### Prerequisites
66

7-
- [**componentize-go**](https://github.com/bytecodealliance/componentize-go) - v0.3.0
7+
- [**componentize-go**](https://github.com/bytecodealliance/componentize-go) - Latest version
88
- [**go**](https://go.dev/dl/) - v1.25+
99
- [**wasmtime**](https://github.com/bytecodealliance/wasmtime) - v43.0.0
1010

@@ -28,3 +28,15 @@ make run-tests
2828
make generate-bindings
2929
go test ./unit_tests_should_pass ./unit_tests_should_fail
3030
```
31+
32+
### Run `go vet`
33+
34+
The generated code will fail the default `go vet` analysis due to:
35+
- How `unsafe.Pointer` is used
36+
- How the WIT tuple type is represented in Go
37+
38+
If you must perform static analysis on the generated code, this is the workaround:
39+
40+
```sh
41+
go vet -unsafeptr=false -composites=false ./...
42+
```

examples/wasip3/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ switch to the upstream releases.
1818

1919
### Prerequisites
2020

21-
- [**componentize-go**](https://github.com/bytecodealliance/componentize-go) - v0.3.0
21+
- [**componentize-go**](https://github.com/bytecodealliance/componentize-go) - Latest version
2222
- [**wasmtime**](https://github.com/bytecodealliance/wasmtime) - v43.0.0
2323

2424
### Build and Run

0 commit comments

Comments
 (0)