bazelbuild/rules_d

D rules for Bazel

27

stars

224

commits

Starlark

primary language

Sep 13, 2026

updated

registry.bazel.build/modules/rules_d
bazel
bazel-rules
dlang
dmd
dub
ldc

README

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.

Contributors

dcarp

99 commits

renovate[bot]

79 commits

damienmg

7 commits

n8sh

6 commits

bazelbuild/rules_d

D rules for Bazel

27

stars

224

commits

Starlark

primary language

Sep 13, 2026

updated

registry.bazel.build/modules/rules_d
bazel
bazel-rules
dlang
dmd
dub
ldc

README

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.

Contributors

dcarp

99 commits

renovate[bot]

79 commits

damienmg

7 commits

n8sh

6 commits

Languages

Starlark

60.4%

D

39.5%