add devcontainer for wasm-go plugin developing (#749)

Co-authored-by: Xunzhuo <bitliu@tencent.com>
This commit is contained in:
rinfx
2024-01-26 16:59:06 +08:00
committed by GitHub
parent ad4cfdbd40
commit ccea33655f
4 changed files with 133 additions and 0 deletions

View File

@@ -60,3 +60,16 @@ builder:
.
@echo ""
@echo "image: ${BUILDER}"
local-build:
tinygo build -scheduler=none -target=wasi -gc=custom -tags='custommalloc nottinygc_finalizer' \
-o extensions/${PLUGIN_NAME}/main.wasm \
extensions/${PLUGIN_NAME}/main.go
@echo ""
@echo "wasm: extensions/${PLUGIN_NAME}/main.wasm"
local-run:
python3 .devcontainer/gen_config.py ${PLUGIN_NAME}
envoy -c extensions/${PLUGIN_NAME}/config.yaml --concurrency 0 --log-level info --component-log-level wasm:debug
local-all: local-build local-run