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
2 changes: 1 addition & 1 deletion .bazelversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6.1.0
7.6.1
6 changes: 2 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# bazel build folders
/bazel-bin
/bazel-grpc-httpjson-transcoding
/bazel-out
/bazel-testlogs
/bazel-*
MODULE.bazel.lock

# IDE
.clwb/
Expand Down
49 changes: 49 additions & 0 deletions MODULE.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
module(
name = "grpc-httpjson-transcoding",
version = "",
)

bazel_dep(name = "abseil-cpp", version = "20240116.2", repo_name = "com_google_absl")
bazel_dep(name = "bazel_skylib", version = "1.8.2")
bazel_dep(name = "gazelle", version = "0.45.0", repo_name = "bazel_gazelle")
bazel_dep(name = "google_benchmark", version = "1.8.3", repo_name = "com_google_benchmark")
bazel_dep(name = "googleapis", version = "0.0.0-20250826-a92cee39", repo_name = "com_google_googleapis")
bazel_dep(name = "googleapis-cc", version = "1.0.0")
bazel_dep(name = "googletest", version = "1.14.0", repo_name = "com_google_googletest")
bazel_dep(name = "nlohmann_json", version = "3.11.3", repo_name = "com_github_nlohmann_json")
bazel_dep(name = "protobuf", version = "29.3", repo_name = "com_google_protobuf")
bazel_dep(name = "rules_cc", version = "0.1.1")
bazel_dep(name = "rules_go", version = "0.57.0", repo_name = "io_bazel_rules_go")
bazel_dep(name = "proto-converter", repo_name = "com_google_protoconverter")

git_override(
module_name = "proto-converter",
commit = "2458ed8ea405b47c1960f0b0af211efdf0e057a0",
remote = "https://github.com/mmorel-35/proto-converter.git",
)

bazel_dep(name = "rules_ruby", version = "0.20.1")
bazel_dep(name = "rules_python", version = "1.6.3")

bazel_dep(name = "rules_fuzzing", version = "0.6.0", dev_dependency = True)

switched_rules = use_extension("@com_google_googleapis//:extensions.bzl", "switched_rules")
switched_rules.use_languages(
cc = True,
)
use_repo(switched_rules, "com_google_googleapis_imports")

# -- bazel_dep definitions -- #

http_archive = use_repo_rule("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
# -- use_repo_rule statements -- #


http_archive(
name = "io_bazel_rules_docker",
urls = [
"https://github.com/bazelbuild/rules_docker/releases/download/v0.25.0/rules_docker-v0.25.0.tar.gz"
],
sha256 = "b1e80761a8a8243d03ebca8845e9cc1ba6c82ce7c5179ce2b295cd36f7e394bf",
)
# -- repo definitions -- #
22 changes: 18 additions & 4 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,24 @@ load("@rules_fuzzing//fuzzing:init.bzl", "rules_fuzzing_init")

rules_fuzzing_init()

http_archive(
name = "rules_cc",
urls = ["https://github.com/bazelbuild/rules_cc/releases/download/0.1.1/rules_cc-0.1.1.tar.gz"],
sha256 = "712d77868b3152dd618c4d64faaddefcc5965f90f5de6e6dd1d5ddcd0be82d42",
strip_prefix = "rules_cc-0.1.1",
)

http_archive(
name = "rules_proto",
sha256 = "6fb6767d1bef535310547e03247f7518b03487740c11b6c6adb7952033fe1295",
strip_prefix = "rules_proto-6.0.2",
url = "https://github.com/bazelbuild/rules_proto/releases/download/6.0.2/rules_proto-6.0.2.tar.gz",
)

load("@rules_proto//proto:repositories.bzl", "rules_proto_dependencies")

rules_proto_dependencies()

protobuf_repositories()

load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps")
Expand Down Expand Up @@ -88,10 +106,6 @@ load(
_cc_image_repos()
# END io_bazel_rules_docker

load("@rules_proto//proto:repositories.bzl", "rules_proto_dependencies", "rules_proto_toolchains")

rules_proto_toolchains()

load("@com_google_googleapis//:repository_rules.bzl", "switched_rules_by_language")

switched_rules_by_language(
Expand Down
Empty file added WORKSPACE.bzlmod
Empty file.
5 changes: 3 additions & 2 deletions perf_benchmark/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@
#
################################################################################
#
load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library", "cc_test")
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
load("@com_google_protobuf//bazel:cc_proto_library.bzl", "cc_proto_library")
load("@com_google_protobuf//bazel:proto_library.bzl", "proto_library")
load("@io_bazel_rules_docker//cc:image.bzl", "cc_image")
load("@io_bazel_rules_docker//container:container.bzl", "container_push")
load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library", "cc_test")

cc_proto_library(
name = "benchmark_cc_proto",
Expand Down
41 changes: 20 additions & 21 deletions repositories.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,19 @@
################################################################################
#
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")

def absl_repositories(bind = True):
def absl_repositories():
http_archive(
name = "com_google_absl",
sha256 = "ea1d31db00eb37e607bfda17ffac09064670ddf05da067944c4766f517876390",
strip_prefix = "abseil-cpp-c2435f8342c2d0ed8101cb43adfd605fdc52dca2", # May 04, 2023.
urls = ["https://github.com/abseil/abseil-cpp/archive/c2435f8342c2d0ed8101cb43adfd605fdc52dca2.zip"],
sha256 = "f49929d22751bf70dd61922fb1fd05eb7aec5e7a7f870beece79a6e28f0a06c1",
strip_prefix = "abseil-cpp-4a2c63365eff8823a5221db86ef490e828306f9d", # Abseil LTS 20240116.0
urls = ["https://github.com/abseil/abseil-cpp/archive/4a2c63365eff8823a5221db86ef490e828306f9d.zip"],
)

PROTOBUF_COMMIT = "315ffb5be89460f2857387d20aefc59b76b8bdc3" # May 31, 2023
PROTOBUF_SHA256 = "aa61db6ff113a1c76eac9408144c6e996c5e2d6b2410818fd7f1b0d222a50bf8"
PROTOBUF_COMMIT = "b407e8416e3893036aee5af9a12bd9b6a0e2b2e6" # v29.3: Oct 2, 2025
PROTOBUF_SHA256 = "55912546338433f465a552e9ef09930c63b9eb697053937416890cff83a8622d"

def protobuf_repositories(bind = True):
def protobuf_repositories():
http_archive(
name = "com_google_protobuf",
strip_prefix = "protobuf-" + PROTOBUF_COMMIT,
Expand All @@ -41,37 +40,37 @@ def protobuf_repositories(bind = True):
GOOGLETEST_COMMIT = "f8d7d77c06936315286eb55f8de22cd23c188571" # v1.14.0: Aug 2, 2023
GOOGLETEST_SHA256 = "7ff5db23de232a39cbb5c9f5143c355885e30ac596161a6b9fc50c4538bfbf01"

def googletest_repositories(bind = True):
def googletest_repositories():
http_archive(
name = "com_google_googletest",
strip_prefix = "googletest-" + GOOGLETEST_COMMIT,
url = "https://github.com/google/googletest/archive/" + GOOGLETEST_COMMIT + ".tar.gz",
sha256 = GOOGLETEST_SHA256,
)

GOOGLEAPIS_COMMIT = "1d5522ad1056f16a6d593b8f3038d831e64daeea" # Sept 03, 2020
GOOGLEAPIS_SHA256 = "cd13e547cffaad217c942084fd5ae0985a293d0cce3e788c20796e5e2ea54758"
GOOGLEAPIS_COMMIT = "a92cee399e0fc8afa2d460373b1085f543bc8d3f" # Aug 26, 2025
GOOGLEAPIS_SHA256 = "468056c3244b7a4f6a575a135b6b6dde280a3f219203a01c4a09d0cf504a4ba6"

def googleapis_repositories(bind = True):
def googleapis_repositories():
http_archive(
name = "com_google_googleapis",
strip_prefix = "googleapis-" + GOOGLEAPIS_COMMIT,
url = "https://github.com/googleapis/googleapis/archive/" + GOOGLEAPIS_COMMIT + ".tar.gz",
sha256 = GOOGLEAPIS_SHA256,
)

GOOGLEBENCHMARK_COMMIT = "1.7.0" # Jul 25, 2022
GOOGLEBENCHMARK_SHA256 = "3aff99169fa8bdee356eaa1f691e835a6e57b1efeadb8a0f9f228531158246ac"
GOOGLEBENCHMARK_COMMIT = "1.8.3" # Jan 11, 2024
GOOGLEBENCHMARK_SHA256 = "6bc180a57d23d4d9515519f92b0c83d61b05b5bab188961f36ac7b06b0d9e9ce"

def googlebenchmark_repositories(bind = True):
def googlebenchmark_repositories():
http_archive(
name = "com_google_benchmark",
strip_prefix = "benchmark-" + GOOGLEBENCHMARK_COMMIT,
url = "https://github.com/google/benchmark/archive/v" + GOOGLEBENCHMARK_COMMIT + ".tar.gz",
sha256 = GOOGLEBENCHMARK_SHA256,
)

def nlohmannjson_repositories(bind = True):
def nlohmannjson_repositories():
http_archive(
name = "com_github_nlohmann_json",
strip_prefix = "json-3.11.3",
Expand All @@ -82,17 +81,17 @@ def nlohmannjson_repositories(bind = True):
RULES_DOCKER_COMMIT = "0.25.0" # Jun 22, 2022
RULES_DOCKER_SHA256 = "b1e80761a8a8243d03ebca8845e9cc1ba6c82ce7c5179ce2b295cd36f7e394bf"

def io_bazel_rules_docker(bind = True):
def io_bazel_rules_docker():
http_archive(
name = "io_bazel_rules_docker",
sha256 = RULES_DOCKER_SHA256,
urls = ["https://github.com/bazelbuild/rules_docker/releases/download/v" + RULES_DOCKER_COMMIT + "/rules_docker-v" + RULES_DOCKER_COMMIT + ".tar.gz"],
)

def protoconverter_repositories(bind = True):
def protoconverter_repositories():
http_archive(
name = "com_google_protoconverter",
sha256 = "6081836fa3838ebb1aa15089a5c3e20f877a0244c7a39b92a2000efb40408dcb",
strip_prefix = "proto-converter-d77ff301f48bf2e7a0f8935315e847c1a8e00017",
urls = ["https://github.com/grpc-ecosystem/proto-converter/archive/d77ff301f48bf2e7a0f8935315e847c1a8e00017.zip"],
sha256 = "17c49df769dcd505a57fc99136075f1a1f8418ab03914faf7af692772ce54d54",
strip_prefix = "proto-converter-2458ed8ea405b47c1960f0b0af211efdf0e057a0",
urls = ["https://github.com/mmorel-35/proto-converter/archive/2458ed8ea405b47c1960f0b0af211efdf0e057a0.zip"],
Copy link
Author

@mmorel-35 mmorel-35 Oct 4, 2025

Choose a reason for hiding this comment

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

Warning, this is to validate the bzlmod migration of proto-converter, until https://github.com/grpc-ecosystem/proto-converter/pull/6/files is merged

)