Hi everyone,
I’m happy to announce the availability of rules_d — the Bazel ruleset for the D programming language, now with Bazel module (Bzlmod) support.
The goal of this project is to make D a first-class citizen in the Bazel ecosystem, so that you can build, test, and package D code alongside C++, Rust, Go, or any other languages supported by Bazel, all within the same build graph.
Current Features
d_binary
andd_library
rules for compiling D source filesd_test
rule for unit testing- Support for multiple D compilers (DMD, LDC)
- Dependency handling and incremental builds via Bazel
- Interop with C/C++:
d_binary
,d_library
andd_test
targets can depend oncc_library
targets - Distributed via Bzlmod for straightforward integration:
bazel_dep(name = "rules_d", version = "0.1.3")
Get Involved
The project has been freshly reimplemented for bzlmod, so feedback and contributions are very welcome.
- GitHub: https://github.com/bazel-contrib/rules_d
- Issues/feature requests: please open tickets
- Contributions: PRs are highly encouraged
I’m also looking for a co-maintainer. If you’re interested in Bazel, D, and polyglot build systems, please reach out!
If you’re already using Bazel or curious about experimenting with D in larger polyglot codebases, give it a try and let me know how it works for you.
Looking forward to your feedback!
Dragos C.