Skip to content

Conversation

@leonm1
Copy link
Contributor

@leonm1 leonm1 commented Jan 21, 2026

Creating a draft PR to run CI on proxy-wasm-cpp-host with MODULE.bazel by default.

MODULE.bazel Outdated
"dragonbox",
"fast_float",
"fp16",
"highway",
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I decided to leave these dependencies in the V8 extension since that way there is a clear link they can be updated and/or added and/or removed together.

MODULE.bazel Outdated
version = "0.0.0",
)

bazel_dep(name = "abseil-cpp", version = "20250814.1")
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
bazel_dep(name = "abseil-cpp", version = "20250814.1")
bazel_dep(name = "abseil-cpp", version = "20250814.1", repo_name = "com_google_absl")

Can you sort bazel_deps by name, this help keeping it readable and bzlmod doesn"t rely on this order

MODULE.bazel Outdated
Comment on lines 31 to 32
bazel_dep(name = "rules_fuzzing", version = "0.6.0")
bazel_dep(name = "googletest", version = "1.17.0.bcr.2", repo_name = "com_google_googletest")
Copy link
Contributor

Choose a reason for hiding this comment

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

You probably can flag them as dev_dependency, you can group them one line after the main bazel_deps group

)

# Configure and register the toolchain.
llvm = use_extension("@toolchains_llvm//toolchain/extensions:llvm.bzl", "llvm")
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
llvm = use_extension("@toolchains_llvm//toolchain/extensions:llvm.bzl", "llvm")
llvm = use_extension("@toolchains_llvm//toolchain/extensions:llvm.bzl", "llvm", dev_dependency = True)

See https://github.com/bazel-contrib/toolchains_llvm?tab=readme-ov-file#customizations

emscripten_deps.config(version = "4.0.17")

archive_override(
module_name = "proxy-wasm-cpp-sdk",
Copy link
Contributor

Choose a reason for hiding this comment

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

The archive override is local and will need to be also done by dependent first one envoy.
proxy-wasm-cpp-sdk shall be published in BCR.
I wish proxy-wasm/proxy-wasm-cpp-sdk#190 was merged first then a first version can be manually published in the BCR and ready to be used here

Comment on lines 22 to 27
direct_deps = _wasmtime_crate_repositories()
return ctx.extension_metadata(
reproducible = bazel_features.external_deps.extension_metadata_has_reproducible,
root_module_direct_deps = [dep.repo for dep in direct_deps],
root_module_direct_dev_deps = [],
)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
direct_deps = _wasmtime_crate_repositories()
return ctx.extension_metadata(
reproducible = bazel_features.external_deps.extension_metadata_has_reproducible,
root_module_direct_deps = [dep.repo for dep in direct_deps],
root_module_direct_dev_deps = [],
)
deps = []
for repo in _wasmtime_crate_repositories():
if not repo.is_dev_dep:
deps.append(repo.repo)
return module_ctx.extension_metadata(
reproducible = bazel_features.external_deps.extension_metadata_has_reproducible,
root_module_direct_deps = deps,
root_module_direct_dev_deps = [],
)

Comment on lines 34 to 39
direct_deps = _wasmsign_crate_repositories()
return ctx.extension_metadata(
reproducible = bazel_features.external_deps.extension_metadata_has_reproducible,
root_module_direct_deps = [dep.repo for dep in direct_deps],
root_module_direct_dev_deps = [],
)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
direct_deps = _wasmsign_crate_repositories()
return ctx.extension_metadata(
reproducible = bazel_features.external_deps.extension_metadata_has_reproducible,
root_module_direct_deps = [dep.repo for dep in direct_deps],
root_module_direct_dev_deps = [],
)
deps = []
for repo in _wasmsign_crate_repositories():
if not repo.is_dev_dep:
deps.append(repo.repo)
return module_ctx.extension_metadata(
reproducible = bazel_features.external_deps.extension_metadata_has_reproducible,
root_module_direct_deps = deps,
root_module_direct_dev_deps = [],
)

phlax and others added 15 commits January 23, 2026 14:20
Signed-off-by: Ryan Northey <ryan@synca.io>
Fixes github.com/bazelbuild/bazel/issues/27582

Signed-off-by: Matt Leon <mattleon@google.com>
Changes from 1e1ebdb:
* Adds toolchain
* Removes unneeded wasmtime crates imports
* Adds wasmsign2-cli crates
* Adds patch for rules_rust to avoid staticlib linking issue

Notably, this change does not use V8 from BCR because V8's MODULE.bazel file is missing various deps (fp16, simdutf, fast_float, intel_ittapi, dragonbox).

Signed-off-by: Matt Leon <mattleon@google.com>
Signed-off-by: Matt Leon <mattleon@google.com>
Signed-off-by: Matt Leon <mattleon@google.com>
Signed-off-by: Matt Leon <mattleon@google.com>
Signed-off-by: Matt Leon <mattleon@google.com>
Signed-off-by: Matt Leon <mattleon@google.com>
Signed-off-by: Matt Leon <mattleon@google.com>
Signed-off-by: Matt Leon <mattleon@google.com>
Not all deps need be reachable from the root workspace for bzlmod.

Signed-off-by: Matt Leon <mattleon@google.com>
Signed-off-by: Matt Leon <mattleon@google.com>
Signed-off-by: Matt Leon <mattleon@google.com>
Signed-off-by: Matt Leon <mattleon@google.com>
Signed-off-by: Matt Leon <mattleon@google.com>
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.

3 participants