-
Notifications
You must be signed in to change notification settings - Fork 72
Open
Description
After a few rounds of Bazel errors, this is what worked for me:
In MODULE.bazel:
bazel_dep(
name = "proxy-wasm-cpp-sdk",
version = "0.0.0",
repo_name = "proxy_wasm_cpp_sdk",
)
# Use git_override for proxy-wasm-cpp-sdk
git_override(
module_name = "proxy-wasm-cpp-sdk",
remote = "https://github.com/proxy-wasm/proxy-wasm-cpp-sdk.git",
commit = "e5256b0c5463ea9961965ad5de3e379e00486640",
)
In the BUILD with the source code:
load("@proxy_wasm_cpp_sdk//bazel:defs.bzl", "proxy_wasm_cc_binary")
licenses(["notice"]) # Apache 2
proxy_wasm_cc_binary(
name = "http_wasm_example.wasm",
srcs = ["http_wasm_example.cc"],
copts = ["-std=c++20"],
)
then running bazel build //src:http_wasm_example.wasm worked perfectly. Now it's just a matter of creating a scratch image with the built wasm file.
Metadata
Metadata
Assignees
Labels
No labels