Replies: 1 comment
-
建议参考一下这个 Makefile,用容器的方式构建插件,会更方便一些:https://github.com/alibaba/higress/blob/main/plugins/wasm-go/Makefile |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
按照指引自定义wasm插件(https://higress.cn/docs/latest/user/wasm-go/)
1、环境
go1.19 windows/amd64
tinygo version 0.28.1 windows/amd64
2、插件依赖执行:
go get github.com/higress-group/proxy-wasm-go-sdk
go get github.com/alibaba/higress/plugins/wasm-go@main
go get github.com/tidwall/gjson
3、编译生成wasm文件时
go mod tidy
tinygo build -o main.wasm -scheduler=none -target=wasi -gc=custom -tags="custommalloc nottinygc_finalizer" ./
但是tinygo build 命令执行时会报 github.com/higress-group/proxy-wasm-go-sdk 该依赖的编码问题
可实际上打开该文件看到是utf-8编码。
Beta Was this translation helpful? Give feedback.
All reactions