Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Disable Bzlmod
common --noenable_bzlmod
common --enable_workspace

# Pass CC, CXX and PATH from the environment.
build --action_env=CC
Expand Down
211 changes: 211 additions & 0 deletions MODULE.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,211 @@
# Copyright 2025 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

module(
name = "proxy_wasm_cpp_host",
version = "0.0.0",
)

bazel_dep(name = "envoy", version = "")

bazel_dep(name = "abseil-cpp", version = "20250814.1")
bazel_dep(name = "bazel_features", version = "1.21.0")
bazel_dep(name = "bazel_skylib", version = "1.7.0")
bazel_dep(name = "platforms", version = "1.0.0")
bazel_dep(name = "protobuf", version = "33.2", repo_name = "com_google_protobuf")
bazel_dep(name = "proxy-wasm-cpp-sdk", version = "0.0.0", repo_name = "proxy_wasm_cpp_sdk")
bazel_dep(name = "rules_cc", version = "0.1.5")
bazel_dep(name = "rules_license", version = "1.0.0")
bazel_dep(name = "rules_python", version = "1.7.0")
bazel_dep(name = "rules_rust", version = "0.68.1")

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@leonm1 this currently has no llvm toolchain setup - it should have it added as a dev_dependency

it wont prevent consumers from using it - but you will need the toolchain setup in order to test bzlmod

git_override(
module_name = "proxy-wasm-cpp-sdk",
commit = "e5256b0c5463ea9961965ad5de3e379e00486640",
remote = "https://github.com/proxy-wasm/proxy-wasm-cpp-sdk",
patch_strip = 1,
patches = ["//bazel:proxy-wasm-cpp-sdk.patch"],
)

python = use_extension("@rules_python//python/extensions:python.bzl", "python")
python.toolchain(
is_default = True,
python_version = "3.12",
)
use_repo(
python,
"python_3_12",
python = "python_versions",
)
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
pip.parse(
hub_name = "v8_python_deps",
python_version = "3.12",
requirements_lock = "@v8//:bazel/requirements.txt",
)
use_repo(pip, "v8_python_deps")

rust = use_extension("@rules_rust//rust:extensions.bzl", "rust")
rust.toolchain(
edition = "2021",
versions = ["1.91.0"],
)
use_repo(rust, "rust_toolchains")

register_toolchains("@rust_toolchains//:all")

wasmtime = use_extension("//bazel:extensions.bzl", "wasmtime")
use_repo(wasmtime, "com_github_wasmtime")

wasmtime_crates = use_extension("//bazel:extensions.bzl", "wasmtime_crates")
use_repo(
wasmtime_crates,
"cu",
"cu__ahash-0.8.11",
"cu__aho-corasick-1.1.3",
"cu__anyhow-1.0.86",
"cu__arbitrary-1.3.2",
"cu__bitflags-2.6.0",
"cu__bumpalo-3.16.0",
"cu__cc-1.1.7",
"cu__cfg-if-1.0.0",
"cu__cobs-0.2.3",
"cu__cranelift-bforest-0.111.0",
"cu__cranelift-bitset-0.111.0",
"cu__cranelift-codegen-0.111.0",
"cu__cranelift-codegen-meta-0.111.0",
"cu__cranelift-codegen-shared-0.111.0",
"cu__cranelift-control-0.111.0",
"cu__cranelift-entity-0.111.0",
"cu__cranelift-frontend-0.111.0",
"cu__cranelift-isle-0.111.0",
"cu__cranelift-native-0.111.0",
"cu__cranelift-wasm-0.111.0",
"cu__crc32fast-1.4.2",
"cu__either-1.13.0",
"cu__embedded-io-0.4.0",
"cu__env_logger-0.10.2",
"cu__equivalent-1.0.1",
"cu__errno-0.3.9",
"cu__fallible-iterator-0.3.0",
"cu__gimli-0.29.0",
"cu__hashbrown-0.13.2",
"cu__hashbrown-0.14.5",
"cu__heck-0.4.1",
"cu__hermit-abi-0.3.9",
"cu__humantime-2.1.0",
"cu__id-arena-2.2.1",
"cu__indexmap-2.3.0",
"cu__is-terminal-0.4.12",
"cu__itertools-0.12.1",
"cu__itoa-1.0.11",
"cu__leb128-0.2.5",
"cu__libc-0.2.155",
"cu__libm-0.2.8",
"cu__linux-raw-sys-0.4.14",
"cu__log-0.4.22",
"cu__mach2-0.4.2",
"cu__memchr-2.7.4",
"cu__memfd-0.6.4",
"cu__object-0.36.2",
"cu__once_cell-1.19.0",
"cu__paste-1.0.15",
"cu__pin-project-lite-0.2.14",
"cu__postcard-1.0.8",
"cu__proc-macro2-1.0.86",
"cu__psm-0.1.21",
"cu__quote-1.0.36",
"cu__regalloc2-0.9.3",
"cu__regex-1.10.5",
"cu__regex-automata-0.4.7",
"cu__regex-syntax-0.8.4",
"cu__rustc-hash-1.1.0",
"cu__rustix-0.38.34",
"cu__ryu-1.0.18",
"cu__semver-1.0.23",
"cu__serde-1.0.204",
"cu__serde_derive-1.0.204",
"cu__serde_json-1.0.120",
"cu__slice-group-by-0.3.1",
"cu__smallvec-1.13.2",
"cu__sptr-0.3.2",
"cu__stable_deref_trait-1.2.0",
"cu__syn-2.0.72",
"cu__target-lexicon-0.12.16",
"cu__termcolor-1.4.1",
"cu__thiserror-1.0.63",
"cu__thiserror-impl-1.0.63",
"cu__tracing-0.1.40",
"cu__tracing-attributes-0.1.27",
"cu__tracing-core-0.1.32",
"cu__unicode-ident-1.0.12",
"cu__unicode-xid-0.2.4",
"cu__version_check-0.9.5",
"cu__wasm-encoder-0.215.0",
"cu__wasmparser-0.215.0",
"cu__wasmprinter-0.215.0",
"cu__wasmtime-24.0.0",
"cu__wasmtime-asm-macros-24.0.0",
"cu__wasmtime-c-api-macros-24.0.0",
"cu__wasmtime-component-macro-24.0.0",
"cu__wasmtime-component-util-24.0.0",
"cu__wasmtime-cranelift-24.0.0",
"cu__wasmtime-environ-24.0.0",
"cu__wasmtime-jit-icache-coherence-24.0.0",
"cu__wasmtime-slab-24.0.0",
"cu__wasmtime-types-24.0.0",
"cu__wasmtime-versioned-export-macros-24.0.0",
"cu__wasmtime-wit-bindgen-24.0.0",
"cu__winapi-util-0.1.8",
"cu__windows-sys-0.52.0",
"cu__windows-targets-0.52.6",
"cu__windows_aarch64_gnullvm-0.52.6",
"cu__windows_aarch64_msvc-0.52.6",
"cu__windows_i686_gnu-0.52.6",
"cu__windows_i686_gnullvm-0.52.6",
"cu__windows_i686_msvc-0.52.6",
"cu__windows_x86_64_gnu-0.52.6",
"cu__windows_x86_64_gnullvm-0.52.6",
"cu__windows_x86_64_msvc-0.52.6",
"cu__wit-parser-0.215.0",
"cu__zerocopy-0.7.35",
"cu__zerocopy-derive-0.7.35",
)

# WAMR runtime
wamr = use_extension("//bazel:extensions.bzl", "wamr")
use_repo(wamr, "com_github_bytecodealliance_wasm_micro_runtime")

# V8 runtime and its dependencies
v8 = use_extension("//bazel:extensions.bzl", "v8")
Copy link
Contributor Author

Choose a reason for hiding this comment

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

ideally we add a v8 (and friends) bzlmod

use_repo(v8, "v8")

v8_deps = use_extension("//bazel:extensions.bzl", "v8_deps")
use_repo(
v8_deps,
"dragonbox",
"fast_float",
"fp16",
"highway",
"intel_ittapi",
"simdutf",
)

# WasmEdge runtime
wasmedge = use_extension("//bazel:extensions.bzl", "wasmedge")
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this file was originally bot generated - this is probably correct - but we dont test this in envoy

use_repo(wasmedge, "com_github_wasmedge_wasmedge")

# BoringSSL (for crypto, unless using system crypto)
boringssl = use_extension("//bazel:extensions.bzl", "boringssl")
use_repo(boringssl, "boringssl")
Loading
Loading