Skip to content

feat: add d_proto_library#194

Merged
dcarp merged 3 commits intobazel-contrib:mainfrom
dcarp:codex-d-proto-library
May 2, 2026
Merged

feat: add d_proto_library#194
dcarp merged 3 commits intobazel-contrib:mainfrom
dcarp:codex-d-proto-library

Conversation

@dcarp
Copy link
Copy Markdown
Collaborator

@dcarp dcarp commented May 2, 2026

Summary

Adds d_proto_library for generating and compiling D code from proto_library targets.

This uses Protobuf’s Bazel-provided ProtoInfo and protoc, plus the protobuf-d v0.7.0 runtime/compiler plugin exposed as @protobuf_d. The rule follows the modern <lang>_proto_library shape where proto inputs are provided through deps.

Changes

  • Add d_proto_library and d_proto_aspect
  • Generate D sources with @protobuf//:protoc and @protobuf_d//protoc_gen_d:protoc-gen-d
  • Compile generated D sources through the shared d_compile helper
  • Add protobuf 30.2 and protobuf_d repository setup for Bzlmod and WORKSPACE
  • Refactor d_compile/d_proto_compile to take explicit action inputs instead of full rule context
  • Add in-repo proto coverage, including transitive proto deps
  • Add e2e smoke coverage for d_proto_library in both Bzlmod and WORKSPACE setup

Testing

  • bazel test //...
  • bazel test //... from e2e/smoke
  • USE_BAZEL_VERSION=8.4.2 bazel --output_base=/tmp/rules_d_e2e_workspace_bazel_8_4_2 test //... --enable_workspace --noenable_bzlmod

@dcarp dcarp changed the title Add d_proto_library feat: add d_proto_library May 2, 2026
@dcarp dcarp force-pushed the codex-d-proto-library branch from 7ed66f6 to cf52edb Compare May 2, 2026 10:20
@dcarp dcarp force-pushed the codex-d-proto-library branch from f01750c to 92fc422 Compare May 2, 2026 11:03
@dcarp dcarp merged commit 7896110 into bazel-contrib:main May 2, 2026
14 checks passed
@dcarp dcarp deleted the codex-d-proto-library branch May 3, 2026 07:37
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