rules_d
v0.10.1
published 1 week ago
27 stars
21 forks
19 watchers
Apache License 2.0
public
6 assets
84,741 downloads
92 KB
v0.10.1
May 26, 2026
[expand for release notes]

Bazel Rules for the D Programming Language

rules_d provides Bazel rules and toolchains for building D libraries, binaries, tests, protocol buffers, and projects that depend on DUB packages.

Documentation

Tutorials

Installation

With Bzlmod, add rules_d to your MODULE.bazel:

bazel_dep(name = "rules_d", version = "<version>")

Then configure a D toolchain:

d = use_extension("@rules_d//d:extensions.bzl", "d")
d.toolchain(d_version = "dmd-2.112.0")
use_repo(d, "d_toolchains")

register_toolchains("@d_toolchains//:all")

Use the latest published version from the Bazel Central Registry.

WORKSPACE

For legacy WORKSPACE projects, copy the snippet from the release notes for the version you want to use.

To use a commit instead of a release, point http_archive at a GitHub source archive such as https://github.com/bazel-contrib/rules_d/archive/<sha>.tar.gz, set strip_prefix = "rules_d-<sha>", and update the checksum.