Skip to content

Commit

Permalink
chore: bump tinygo (0.29.0, 0.30.0, 0.31.1), use go:wasmimport (#61)
Browse files Browse the repository at this point in the history
Signed-off-by: Edoardo Vacchi <[email protected]>
  • Loading branch information
evacchi authored Mar 8, 2024
1 parent b72bd22 commit e2c12f7
Show file tree
Hide file tree
Showing 73 changed files with 82 additions and 94 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
- 'LICENSE'
pull_request:
env:
GO_VERSION: "1.18"
GO_VERSION: "1.20"
PROTOC_VERSION: "21.12"

jobs:
Expand All @@ -20,9 +20,9 @@ jobs:
fail-fast: false
matrix:
tinygo-version:
- "0.26.0"
- "0.27.0"
- "0.28.1"
- "0.31.1"
- "0.30.0"
- "0.29.0"

steps:
- uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion examples/helloworld/greeting/greet.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion examples/helloworld/greeting/greet_host.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion examples/helloworld/greeting/greet_options.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion examples/helloworld/greeting/greet_plugin.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion examples/helloworld/greeting/greet_vtproto.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion examples/host-function-library/proto/greet.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion examples/host-function-library/proto/greet_host.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion examples/host-function-library/proto/greet_options.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 2 additions & 4 deletions examples/host-function-library/proto/greet_plugin.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion examples/host-function-library/proto/greet_vtproto.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion examples/host-functions/greeting/greet.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion examples/host-functions/greeting/greet_host.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion examples/host-functions/greeting/greet_options.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 3 additions & 7 deletions examples/host-functions/greeting/greet_plugin.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion examples/host-functions/greeting/greet_vtproto.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion examples/known-types/known/known.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion examples/known-types/known/known_host.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion examples/known-types/known/known_options.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion examples/known-types/known/known_plugin.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion examples/known-types/known/known_vtproto.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion examples/wasi/cat/cat.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion examples/wasi/cat/cat_host.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion examples/wasi/cat/cat_options.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion examples/wasi/cat/cat_plugin.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion examples/wasi/cat/cat_vtproto.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 2 additions & 4 deletions gen/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,7 @@ func genHostFunctions(g *protogen.GeneratedFile, f *fileInfo) {
for _, method := range f.hostService.Methods {
importedName := toSnakeCase(method.GoName)
g.P(fmt.Sprintf(`
//go:wasm-module %s
//export %s
//go:linkname _%s
//go:wasmimport %s %s
func _%s(ptr uint32, size uint32) uint64
func (h %s) %s(ctx %s, request *%s) (*%s, error) {
Expand All @@ -127,7 +125,7 @@ func genHostFunctions(g *protogen.GeneratedFile, f *fileInfo) {
}
return response, nil
}`,
f.hostService.Module, importedName, importedName, importedName, structName, method.GoName,
f.hostService.Module, importedName, importedName, structName, method.GoName,
g.QualifiedGoIdent(contextPackage.Ident("Context")),
g.QualifiedGoIdent(method.Input.GoIdent),
g.QualifiedGoIdent(method.Output.GoIdent),
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/knqyf263/go-plugin

go 1.18
go 1.20

require (
github.com/planetscale/vtprotobuf v0.4.0
Expand Down
2 changes: 1 addition & 1 deletion tests/fields/proto/fields.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tests/fields/proto/fields_host.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tests/fields/proto/fields_options.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tests/fields/proto/fields_plugin.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tests/fields/proto/fields_vtproto.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit e2c12f7

Please sign in to comment.