Skip to content

[GSoC26][bazel] add bazel build system support for simple_switch_grpc#1356

Open
c8ef wants to merge 1 commit intop4lang:mainfrom
c8ef:main
Open

[GSoC26][bazel] add bazel build system support for simple_switch_grpc#1356
c8ef wants to merge 1 commit intop4lang:mainfrom
c8ef:main

Conversation

@c8ef
Copy link
Copy Markdown

@c8ef c8ef commented Mar 19, 2026

Introduces a complete bazel build alongside the existing cmake setup, targeting the simple_switch_grpc binary and its test suite.

Key implementation notes:

  • All BUILD files are formatted with Buildifier and enforced in CI via a dedicated GitHub Actions workflow, keeping the Starlark codebase consistent from day one.
  • config.h is generated using the expand_template idiom rather than a raw genrule, making the enabled/disabled feature set explicit and diff-friendly.
  • External dependencies (Boost, gmp, nanomsg, grpc, p4lang/PI, etc.) are currently consumed as system-installed libraries through a module extension (bazel/ubuntu2204.bzl). This avoids the need to vendor or pin every transitive dependency upfront; migration to BCR-sourced modules can be done incrementally.
  • Groundwork for a full Bazel-native p4lang/PI is already underway: uthash@2.3.0 bazelbuild/bazel-central-registry#8031 tracks a third-party library used by the PI library's contribution to BCR, after which the @ubuntu2204//:pi* stubs can be replaced with proper module dependencies.

Signed-off-by: c8ef <c8ef@outlook.com>
@c8ef
Copy link
Copy Markdown
Author

c8ef commented Mar 19, 2026

cc @matthewtlam

@matthewtlam
Copy link
Copy Markdown
Contributor

Thanks for your PR @c8ef.

None of the PRs will be carefully reviewed until Apr 1 (once the contributor deadline is over). The GSoC contributor application is currently opened. Please make sure you submit your application before the deadline.

During the first week of April, after applications and PRs are reviewed, candidates who will be considered will be sent an interview. The contributor who gets admitted into GSoC will have their PR pushed to head

cc: @qobilidop

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