Announcing rules_d: Bazel rules for the D programming language with bzlmod support
Dragos Carp
dragoscarp at gmail.com
Wed Aug 27 22:49:06 UTC 2025
Hi everyone,
I’m happy to announce the availability of
**[rules_d](https://registry.bazel.build/modules/rules_d)** — the
Bazel ruleset for the D programming language, now with [Bazel
module](https://bazel.build/external/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` and `d_library` rules for compiling D source files
- `d_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` and `d_test`
targets can depend on `cc_library` targets
- Distributed via **Bzlmod** for straightforward integration:
```starlark
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](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.*
More information about the Digitalmars-d-announce
mailing list