This is a collection of links to interesting articles and knowledge sources about the Bazel build system that I found. I’m motivated to do this after spending considerable time developing a thing that already existed. Just because I was not following the “right” communities I basically wasted a lot of effort reinventing a wheel. Useful wheel, but reinventing nevertheless.
I plan to update the sources once in a while, as I discover things.
The list is bootstrapped by links that came to mind immediately, but there are bound to be more that are worth adding here.
Canonical sources
- https://bazel.build: the main website. Lots of documentation, though systematization is something left to be desired.
- https://www.reddit.com/r/bazel/: Bazel on Reddit. Once in a while, this gets posts about interesting bazel developments, sometimes for self-promotion, sometimes authentic, but almost always useful.
- https://groups.google.com/g/bazel-discuss: the bazel mailing list. While ideally, this would be the place to get questions and answers about bazel, in practice it is mostly reduced to release announcements.
- https://github.com/orgs/bazelbuild/discussions: bazel developer discussions. Possibly a place where you might find something useful to you.
- https://github.com/jin/awesome-bazel: a curated list of Bazel rules, tooling and resources. If you find that something is missing from this list, consider checking here instead and if it’s missing there, contribute there.
- https://bcr.bazel.build: the bazel central registry, repository of bazel modules. The significance of this link will probably grow as more users migrate to bazel modules.
- https://slack.bazel.build/: Bazel-related Slack server. I don’t like chat, so I don’t really go for this.
Articles and collections of articles
- https://jayconrod.com/tags/bazel: Jay Conrod’s Bazel writings. Then end in 2023.
- https://blog.engflow.com/: Engflow blog. Engflow is a consulting company based around the Bazel ecosystem.
- https://blog.aspect.build/: Aspect BUILD is a company based around Bazel workflow automation.
- https://blog.aspect.build/never-compile-protoc-again: Don’t compile protoc
- https://hdlfactory.com/tags/bazel/: my bazel writings. Yes, I’m biased, sorry.
- https://hdlfactory.com/post/2023/07/30/bazel-tips-and-tricks/: my collection of often used Bazel tricks.
- https://fzakaria.com/2024/08/29/bazel-overlay-pattern: explaining bazel overlays.
Useful rules
- https://github.com/bazel-contrib/rules_distroless: build distroless containers. Has other uses too. See the link below for an example.
- https://registry.bazel.build/modules/bazel_linux_packages: install linux packages from an apt repo.
- https://github.com/filmil/bazel_debian_rootfs: kinda same as above, but by me. Use the above instead if you can.
- https://www.tweag.io/bazel/: Tweag is a consulting company that also uses Bazel, writes about Bazel and produced interesting Bazel rules.
- https://registry.bazel.build/modules/lit2md: a ruleset for simplistic literate programming. Document your code! (One of mine, if I may say so)
- https://www.tweag.io/blog/2019-02-20-clodl/: collect all libraries used by your binary into a single archive. This mostly works, I found.
Examples
- https://github.com/bazelbuild/examples: a collection of examples of bazel uses
- https://github.com/filmil/bazel-experiments: my bazel experiments, such as WASM, or protoc-as-toolchain etc. Yes, this is by me, and yes I’m biased. Sorry.