Do you need Bazel to make a big app build fast?
Bazel, Tuist and your own build settings speed up different parts of a build. What each one changes, what it costs, who it suits, and how to tell which one your app needs.
Usually not first. Bazel, Tuist and your build settings each speed up a different part of a build. Build settings remove work that a build doesn’t need to do, and fixing them takes an afternoon. Tuist generates your project from Swift manifests and can swap the modules you aren’t editing for prebuilt ones. Bazel replaces the build system, so that anything already built on any machine, a teammate’s Mac or CI, comes from a shared cache. It pays off for large teams that can staff the migration and its upkeep. And no cache, in either tool, helps with the line you just changed, because nobody has built it yet. So fix the settings first, measure where the time goes, and pick a tool for the part that’s left.
The short version
| Approach | What you change | What gets faster | What it costs |
|---|---|---|---|
| Build settings | A few values per target | Every build stops doing work it doesn’t need | An afternoon; nothing new to maintain |
| Tuist | Your project is generated from Swift manifests (its Xcode cache works without them) | Modules you aren’t editing come prebuilt; CI runs only the tests that changed | Writing manifests, one target at a time; a Tuist account for the shared cache |
| Bazel | Your build: BUILD files replace the project as the source of truth | Anything built before, on any machine, comes from a shared cache; CI can build on remote Macs | A migration of months, years at the largest companies, and people to keep it working with each new release |
Three kinds of build time
When a build is slow, the time is going to one of three things, and each tool works on a different one.
- Waste: work the build does that it doesn’t need to. A target set to Whole Module, a debug build that generates a dSYM, a script that runs every time because it doesn’t declare its outputs. Build settings fix this, and nothing else does: a cache can store wasted work, but it doesn’t remove it.
- Repeated work: the same code compiled again on every developer’s Mac, in every CI run and after every fresh checkout. A shared cache fixes this. That’s what Bazel’s remote cache does, what Tuist’s caches do, and what the compilation caching built into recent releases does on one Mac.
- New work: the change you just made. No cache has it, because nobody has built it yet. What helps is a change reaching fewer files: smaller modules with stable interfaces, so that one edit recompiles less.
So the first question isn’t which tool, it’s which kind of time you have. If most of your wait is the edit-build loop on your own Mac, a cache does less than you’d hope: Monzo, after moving to Tuist’s cache, wrote that their “local build times… have remained fairly similar even with the cache”, while their pull requests got much faster on CI (Monzo’s story on Tuist’s site).
Start with the build you have
Fix the waste first. It’s free, it helps every build, and it makes every later measurement honest.
- Build settings. Eight settings decide how much work every debug build does. Our guide to the debug build settings covers each one, and its free check_settings.py script checks every target at once.
- Explicitly built modules. On by default for Swift since Xcode 26. If your project turned them off, often as a workaround during an upgrade, try them again: they let the build system schedule work more evenly, and keeping settings like preprocessor macros the same across targets stops the same module being built twice.
- Compilation caching. Built in since Xcode 26 and off by default:
Find it Build Settings › Enable Compilation Caching
Key COMPILATION_CACHE_ENABLE_CACHING
Debug value Try Yes YES, and measure
In Apple’s release notes, the workflows that “will benefit the most” are “switching between branches” and “clean builds”. It caches on your own Mac; sharing that cache between Macs needs a cache server, which is one of the things Tuist sells (below).
Then measure, so you know which kind of time is left. Build once to warm up, change one line inside a function, and build again with a timing summary:
xcodebuild build -scheme MyApp -destination "platform=iOS Simulator,id=$SIMULATOR_ID" \
-showBuildTimingSummary
Do the same after a clean build and after pulling a day of your team’s changes. Our guide to the build timeline shows how to read where the time went, and the time-build.sh script repeats a build and reports the times.
What Tuist changes
Tuist started as a project generator, and that’s still its core: you describe targets in
Swift files and run tuist generate to get an Xcode project. Tuist recommends not committing the generated
project, so the project file’s merge conflicts go away. A target looks like this
(from Tuist’s migration guide):
let project = Project(name: "MyApp", targets: [
.target(name: "TargetX", destinations: .iOS, product: .framework,
bundleId: "dev.tuist.targetX", sources: ["Sources/TargetX/**"],
dependencies: [.external(name: "Kingfisher")])
])
For build speed, three features matter, and only one of them works without generated projects:
- Module cache (generated projects only): before the build, Tuist replaces the modules you aren’t working on with prebuilt binaries (XCFrameworks), built once and shared through Tuist’s server. You build the modules you’re editing; the rest is ready.
- Selective testing (generated projects only):
tuist test“runs only the tests whose targets changed since the last successful test run”. - Xcode cache (any project): Tuist acts as the shared server for the compilation caching above, “no project generation required”. You add a few user-defined build settings and install its local proxy.
What it costs. Tuist offers no automatic migration from an existing project: its guide says years of
accumulated complexity make that unreliable, and recommends moving one target per pull request, starting with the
ones most others depend on, and comparing the old and new projects in CI as you go. After that, developers run
tuist install and tuist generate after pulling. The command-line tool is MIT licensed; the server is
source-available under the Fair Core License, which turns into MIT later; self-hosting it is an Enterprise option. The hosted cache
is free under usage limits, then paid by use (pricing).
Who it suits. Teams with many modules who are tired of project-file conflicts, and whose CI rebuilds the same modules over and over. Asana chose Tuist over Bazel for its iOS app, calling Bazel “a very heavyweight set of tools that requires new mental models” (Asana’s write-up).
What Bazel changes
Bazel is Google’s open-source build system, and building an app with it means moving the
build itself. In the words of Bazel’s own migration guide, “the BUILD file(s) become the source of truth”
(Migrating from Xcode to Bazel). The community-maintained
rules_apple and
rules_swift describe how to build apps, frameworks and Swift
libraries. A minimal BUILD file, from rules_apple’s README:
load("@rules_apple//apple:ios.bzl", "ios_application")
load("@rules_swift//swift:swift.bzl", "swift_library")
swift_library(
name = "MyLibrary",
srcs = glob(["**/*.swift"]),
)
ios_application(
name = "App",
bundle_id = "com.example.app",
families = ["iphone"],
minimum_os_version = "26.0",
deps = [":MyLibrary"],
)
A real app needs one of these per module, plus its resources, entitlements, signing, script phases rewritten as Bazel rules, and its dependencies: Swift packages through rules_swift_package_manager; CocoaPods has no official path. Developers keep working in the IDE through rules_xcodeproj, which generates a project whose builds run Bazel, with indexing, debugging and previews.
What you get. Every step of the build is an action with declared inputs, run in a sandbox, so its output can be reused safely: “If your build is reproducible, the outputs from one machine can be safely reused on another machine” (remote caching). With a remote cache, a fresh checkout or a CI run downloads what someone already built. With remote execution, CI spreads the build over many machines, which for an app means a fleet of Macs, yours or a provider’s. And one build system can cover the Android app, the backend and the shared code in the same repository.
What it costs. Spotify’s account of its move, for an iOS team of hundreds and a “polyglot, multiplatform, and multimillion-line codebase”, runs from first experiments in 2017 to moving local builds in 2023 (Spotify engineering). Lyft’s retrospective lists “Hermiticity is hard” and “iOS is second class” among its lessons, with dedicated iOS tooling engineers (Lyft at BazelCon 2019). And the rules follow Apple’s tools closely: rules_apple says it is “heavily tied to the Xcode and the tools it ships”, so each new release can mean a rules update before the team can move.
Moving to Bazel doesn’t make a large module smaller. Allegro, after its move, noted that “the main app target still has a large amount of code that must always be compiled” (Allegro’s write-up). The teams that gain most split the app into many small modules on the way, and that part you can do without Bazel.
Who it suits. Large organizations with many developers on one repository, several platforms in it, CI big enough that shared caching and remote execution pay for themselves, and engineers whose job is the build.
How to decide
- Most of your wait is waste. The settings check finds it, or the timeline shows scripts, dSYMs or whole-module compiles. Fix those; no tool is needed.
- Most of your wait is repeated work. Clean builds, fresh checkouts, branch switches, CI. Try compilation caching on its own first. If CI is the bottleneck and you have many modules, Tuist’s caches are the smaller step; its Xcode cache doesn’t even need generated projects.
- You’re a large, multi-platform organization with people to own the build, and CI is a real cost. That’s where Bazel’s remote cache and remote execution earn the migration.
- Most of your wait is new work: the one-line change, rebuilt dozens of times a day. No cache helps here. Smaller modules with stable interfaces do (Apple’s advice: “Break up monolithic targets so that Xcode can do more work in parallel”, and “always measure”), and so do the type-checking fixes in why a one-line change rebuilds so much.
Hand it to your coding agent
To have an agent measure your project and tell you which kind of time you have, give it this:
Read https://quickfirebuild.com/blog/bazel-tuist-or-build-settings/. Then, from the project folder, clone https://github.com/quickfirehq/faster-builds and run `python3 faster-builds/scripts/check_settings.py`. Report its findings, but don't change anything.
Count the targets and Swift packages in the project and the Swift files in the largest target.
For the main scheme on a Simulator destination: time a no-change build with faster-builds/scripts/time-build.sh, then a one-line change inside a function body in the largest target with its -c option. Time one clean build too. Run faster-builds/scripts/timing-summary.sh after the clean build and after the one-line change, and list the five slowest kinds of work in each.
Then tell me which of the article's three kinds of build time (waste, repeated work, new work) takes most of the time, with the numbers, and which option the article suggests for it. Revert the one-line change when you're done.
What’s left
Bazel replaces the build system, and Tuist generates the project from its own manifests. Both pay off most when the same code is built again and again, on many Macs. The wait neither can cache, the one-line change you just made in a large app, is the part we’re working on with Quickfire: faster everyday builds of large apps, on the Xcode project you already have. Early access opens in early 2027.