Skip to content

Add Bazel build support for simple_switch_grpc#1359

Open
koustubh-v wants to merge 7 commits intop4lang:mainfrom
koustubh-v:add-bazel-support-simple-switch-grpc
Open

Add Bazel build support for simple_switch_grpc#1359
koustubh-v wants to merge 7 commits intop4lang:mainfrom
koustubh-v:add-bazel-support-simple-switch-grpc

Conversation

@koustubh-v
Copy link
Copy Markdown

This PR adds initial Bazel build support for simple_switch_grpc as an alternative to the existing CMake-based workflow.

While working on this, I explored the current build system's structure and gradually mapped the required components into Bazel. This includes setting up MODULE.bazel, defining cc_library and cc_binary targets, and wiring core dependencies such as gRPC, protobuf, and spdlog.

The main goal here was to get a working end-to-end Bazel build for simple_switch_grpc. During the process, I also addressed multiple build issues, including missing headers and dependency linking, to ensure the target compiles successfully.

This is a first step toward enabling a cleaner, more modern Bazel-based workflow for BMv2, and I’d really appreciate any feedback or suggestions to improve the structure or dependency handling.

@koustubh-v koustubh-v force-pushed the add-bazel-support-simple-switch-grpc branch 3 times, most recently from 81d2232 to eac2772 Compare March 27, 2026 07:47
@koustubh-v
Copy link
Copy Markdown
Author

Hi @matthewtlam, Kindly Review this PR!

This introduces canonical Bazel build rules (MODULE.bazel, cc_library, cc_grpc_library, cc_test) to simple_switch_grpc and its dependencies, providing an alternative to the existing CMake workflow.

Signed-off-by: Koustubh Verma <hp.koustubh@gmail.com>
Signed-off-by: Koustubh Verma <hp.koustubh@gmail.com>
Signed-off-by: Koustubh Verma <hp.koustubh@gmail.com>
…oto by unifying codegen and system linking

Signed-off-by: Koustubh Verma <hp.koustubh@gmail.com>
@koustubh-v koustubh-v force-pushed the add-bazel-support-simple-switch-grpc branch 2 times, most recently from 538e8dc to 4be250b Compare March 27, 2026 09:05
Signed-off-by: Koustubh Verma <hp.koustubh@gmail.com>
@koustubh-v koustubh-v force-pushed the add-bazel-support-simple-switch-grpc branch from 8ea79ef to 151d01c Compare March 27, 2026 09:06
…witch abort

Signed-off-by: Koustubh Verma <hp.koustubh@gmail.com>
@koustubh-v koustubh-v force-pushed the add-bazel-support-simple-switch-grpc branch from 017bdc2 to 1a04b08 Compare March 27, 2026 10:08
…I execution

Signed-off-by: Koustubh Verma <hp.koustubh@gmail.com>
@koustubh-v
Copy link
Copy Markdown
Author

Sorry for too many commits!

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.

1 participant