Repository navigation
proxy-wasm-cpp-host: wire v8_lib engine dep to the //bazel:v8_engine flag - #61
Merged
Merged
Conversation
…flag The module's patch already declared a //bazel:v8_engine label_flag but never used it: the //:v8_lib cc_library still hardcoded //bazel:wee8_no_pointer_compression, so bzlmod consumers had no seam to redirect the V8 engine (e.g. to a prebuilt wee8 from envoy_toolshed), unlike the crypto/wamr/wasmtime/wasmedge libs which were already flag-driven. The flag is named //bazel:v8_engine to match Envoy's WORKSPACE proxy_wasm_cpp_host.patch, so a single flag name is the seam in both build modes. - Rewrite the //:v8_lib cc_library dep //bazel:wee8_no_pointer_compression -> //bazel:v8_engine. - Fix the //bazel:v8_engine flag default @v8//:wee8 -> //bazel:wee8_no_pointer_compression so the default (unoverridden) build keeps building the pointer-compression- disabled V8 that proxy-wasm requires; @v8//:wee8 would have silently enabled pointer compression. - Update the patch integrity in source.json. Verified with git apply --check and patch --dry-run against the pinned upstream archive (f2db56af). Signed-off-by: Dario Cillerai <[email protected]>
dcillera
force-pushed
the
wire-proxy-wasm-v8-engine
branch
from
September 4, 2026 08:45
f52bfa3 to
d8a800e
Compare
phlax
approved these changes
Sep 4, 2026
phlax
pushed a commit
to envoyproxy/envoy
that referenced
this pull request
Sep 4, 2026
## Commit Message bazel: consume prebuilt wee8 in bzlmod ## Additional Description Wires Envoy's **bzlmod** builds to consume the prebuilt V8 wee8 static library (`libwee8.a`), mirroring what the WORKSPACE build already does (shipped in #47108). This is the bzlmod counterpart of the WORKSPACE wee8 prebuilt injection. Changes: - **Registry pin** ( `api/.bazelrc`) bumped to `4fb0f61a75eb72ffb0b7efaccc72dd9efb6a9dce`, which carries proxy-wasm-cpp-host's `//bazel:v8_engine` `label_flag` — the bzlmod seam for redirecting the V8 engine (envoyproxy/bazel-registry#61). - **`MODULE.bazel`** registers `wee8_prebuilt_extension` so the `@wee8_prebuilt_*` repos exist under bzlmod (the extension equivalent of the WORKSPACE `setup_wee8_prebuilt()`). - **Engine flag** pointed at `//bazel:wee8_engine` in `.bazelrc`, so bzlmod builds select the prebuilt while reusing the existing alias that keeps gcc/sanitizer builds on the from-source engine. - Regenerated the root/api/docs/mobile lockfiles. In WORKSPACE mode the flag already defaults to `@envoy//bazel:wee8_engine` via `bazel/proxy_wasm_cpp_host.patch`; the shared `common` `.bazelrc` line is now safe in both modes because `//bazel:v8_engine` exists in the registry patch as well as the WORKSPACE patch. ## Risk Level Low — bzlmod wiring only; WORKSPACE behavior unchanged. gcc/sanitizer builds continue to build V8 from source via the `wee8_engine` alias fallback. ## Testing `bazel cquery --enable_bzlmod --noenable_workspace 'deps(@proxy-wasm-cpp-host//:v8_lib)'` resolves to `@wee8_prebuilt_x86_64//:lib/libwee8.a` with **no** from-source `@v8//` remaining in the dep path. Lockfiles regenerated via `bazel mod ... deps --lockfile_mode=update` (per `ci/do_ci.sh lockfiles`). ## Docs Changes N/A ## Release Notes N/A ## Platform Specific Features N/A Signed-off-by: Dario Cillerai <[email protected]> Co-authored-by: Claude Opus 4.8 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Wire the proxy-wasm-cpp-host V8 engine dep to
//bazel:v8_enginelabel_flagso bzlmod consumers can redirect the V8/wee8 engine (e.g. to a prebuiltwee8fromenvoy_toolshed) — the same waycrypto_lib,wamr_lib,wasmtime_libandwasmedge_libare already flag-driven.Module:
[email protected].Why
The module's patch already declared a
//bazel:v8_liblabel_flag, but it was dead code: the//:v8_libcc_library still hardcoded//bazel:wee8_no_pointer_compression, so there was no seam to override the V8 engine in bzlmod (unlike the other engine libs). This is the bzlmod-side counterpart to Envoy's WORKSPACEproxy_wasm_cpp_host.patch, which cannot be applied under bzlmod.Changes (
patches/proxy-wasm-cpp-host.patch)//:v8_libcc_library dep//bazel:wee8_no_pointer_compression→//bazel:v8_engine.//bazel:v8_libflag default@v8//:wee8→//bazel:wee8_no_pointer_compression. Behaviour-preserving: the default (unoverridden) build keeps building the pointer-compression-disabled V8 that proxy-wasm requires;@v8//:wee8would have silently enabled pointer compression.source.json.Validation
Against the pinned upstream archive (
f2db56af):git apply --checkandpatch --dry-runboth pass.//:v8_libdeps//bazel:v8_engineand the flag defaults to//bazel:wee8_no_pointer_compression.source.jsonintegrity self-check matches the edited patch.