Hardware Development with Bazel: the book is out
My book Hardware Development with Bazel: Authoring HDL Rules came out on 27 October 2026, in paperback and for Kindle. It has 334 pages. It teaches you to write Bazel rules for hardware: VHDL simulators, verification frameworks and AMD Vivado, up to complete verification and RTL-to-bitstream flows. This post explains who the book is for and what is in it.
Why I wrote it
Hardware teams build FPGA and ASIC designs with Makefiles, TCL scripts and vendor GUIs. Those builds cannot tell what really needs to rebuild after a change. They also often cannot reproduce last year’s bitstream on a new machine, because the result depends on what is installed on the host.
Software teams solved both problems with build systems such as Bazel. Bazel rebuilds only what changed, and it can fetch every tool that a build needs, pinned to a version. But Bazel has no rules for most hardware tools, so a hardware team has to write them. I have been writing such rules since 2024, and I described the result in Bazel all the way down. The book is what I learned on the way, written down in order.
Who it is for
The book is for hardware engineers and build engineers who already use
Bazel, and now need to extend it for a hardware flow.
It assumes that you can write a BUILD file and run bazel build.
It does not assume that you have written a rule before.
What is in it
The book has 22 chapters in seven parts, and nine appendices.
- Hardware development, the Bazel way. Why HDL flows need custom rules, the model that a rule author extends, and when a macro is enough.
- Starlark for rule authors. The language, and how to lay out a ruleset that others can use.
- Authoring HDL rules. Rule anatomy, providers that pass designs along the build graph, actions, generated sources, depsets, and runfiles for simulations that you can run.
- Toolchains and hermeticity for vendor tools. Toolchains, platforms, and how to make a build hermetic when a vendor tool does not cooperate.
- External dependencies and distribution. Repository rules, module extensions, and publishing a ruleset to a registry.
- Advanced authoring. Aspects, tests for rules, and performance.
- End-to-end HDL flows. A complete VHDL verification flow, and a flow from RTL to a bitstream.
Every example comes from a ruleset that is published and in use, such as rules_ghdl, rules_nvc, rules_vivado, rules_vunit and rules_osvvm. So the code in the book is code that already builds real designs.
The companion code
The companion repository has one Bazel package per chapter.
Each target in it builds a listing from the book, so you can compare a page
and a file line by line.
bazel test //... builds every listing that builds, and runs every test.
Some claims in the book are about what fails, for example that Bazel rejects a misspelled attribute. The repository’s CI breaks the example on purpose, and checks that the build fails with the error message that the book prints.
Getting it
The book is on Amazon:
The book’s page on this site has the same links, next to the other books by the people behind HDL Factory.
If the book helps you, a review on Amazon helps other readers find it. If you find a mistake, please report it as an issue on the companion repository.
