Wasm cpp bazel (#446)

This commit is contained in:
Hinsteny Hisoka
2023-07-26 10:55:56 +08:00
committed by GitHub
parent 3b78a0eb62
commit 3700ada7e6
14 changed files with 690 additions and 46 deletions

14
plugins/wasm-cpp/Makefile Normal file
View File

@@ -0,0 +1,14 @@
PLUGIN_NAME ?= key_auth
BUILD_TIME := $(shell date "+%Y%m%d-%H%M%S")
COMMIT_ID := $(shell git rev-parse --short HEAD 2>/dev/null)
IMAGE_TAG = $(if $(strip $(PLUGIN_VERSION)),${PLUGIN_VERSION},${BUILD_TIME}-${COMMIT_ID})
IMG ?= ${REGISTRY}${PLUGIN_NAME}:${IMAGE_TAG}
.PHONY: build
build:
DOCKER_BUILDKIT=1 docker build --build-arg PLUGIN_NAME=${PLUGIN_NAME} \
-t ${IMG} \
--output extensions/${PLUGIN_NAME} \
.
@echo ""
@echo "output wasm file: extensions/${PLUGIN_NAME}/plugin.wasm"