Skip to content

Bazel

Medium — good to knowCI/CD & DevOps

ELI5 - The Vibe Check

Bazel is Google's build tool for when your codebase gets so big that just running an install and build script stops being good enough. It figures out exactly which files changed, builds only what depends on them, and can reuse cached results from anyone else who already built the exact same thing, which is how companies with millions of lines of code still get fast builds.

Real Talk

Bazel is an open-source build and test tool, originally built at Google, that uses a declarative dependency graph to enable incremental, reproducible, and highly parallelized builds across large multi-language monorepos. It supports remote caching and remote execution, so builds can scale across a fleet of machines instead of a single laptop.

Show Me The Code

# BUILD.bazel
load("@rules_js//js:defs.bzl", "js_library")

js_library(
    name = "utils",
    srcs = glob(["src/**/*.ts"]),
    deps = ["//packages/shared:types"],
)

When You'll Hear This

"We moved the monorepo to Bazel once the build started taking 20 minutes on every CI run." / "Bazel's hermetic builds mean the same target produces the same output no matter who runs it."

Made with passive-aggressive love by manoga.digital. Powered by Claude.