Skip to content

bazel: consume prebuilt wee8 in bzlmod - #47203

Merged
phlax merged 1 commit into
envoyproxy:mainfrom
dcillera:wee8-bzlmod-consume-prebuilt
Sep 4, 2026
Merged

phlax merged 1 commit into
envoyproxy:mainfrom
dcillera:wee8-bzlmod-consume-prebuilt

Conversation

@dcillera

@dcillera dcillera commented Sep 4, 2026 •

Copy link
Copy Markdown
Contributor

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 (proxy-wasm-cpp-host: wire v8_lib engine dep to the //bazel:v8_engine flag 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

Wire Envoy's bzlmod builds to consume the prebuilt V8 wee8 static library,
mirroring what the WORKSPACE build already does.

- Register wee8_prebuilt_extension in MODULE.bazel so the @wee8_prebuilt_*
  repos exist under bzlmod (the extension equivalent of the WORKSPACE
  setup_wee8_prebuilt()).
- Regenerate the root/api/docs/mobile lockfiles.

Verified via cquery that @proxy-wasm-cpp-host//:v8_lib resolves to
@wee8_prebuilt_x86_64//:lib/libwee8.a under bzlmod with no from-source
@v8// remaining in the dep path.

Signed-off-by: Dario Cillerai <[email protected]>
Co-Authored-By: Claude Opus 4.8 <[email protected]>
@dcillera
dcillera force-pushed the wee8-bzlmod-consume-prebuilt branch from 5aa8cca to 0ed38d8 Compare September 4, 2026 13:49

@phlax phlax left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, thanks @dcillera

@phlax
phlax enabled auto-merge (squash) September 4, 2026 14:03
@phlax
phlax merged commit 193801d into envoyproxy:main Sep 4, 2026
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants