<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Pedro Piñera Buendía</title>
    <description>The latest articles on DEV Community by Pedro Piñera Buendía (@pepicrft).</description>
    <link>https://dev.to/pepicrft</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4169097%2F90b2ae8e-6161-419b-9e4a-6f0e436d34ca.png</url>
      <title>DEV Community: Pedro Piñera Buendía</title>
      <link>https://dev.to/pepicrft</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/pepicrft"/>
    <language>en</language>
    <item>
      <title>Cut Rust compile time with a Tuist Cargo cache</title>
      <dc:creator>Pedro Piñera Buendía</dc:creator>
      <pubDate>Tue, 17 Nov 2026 14:56:23 +0000</pubDate>
      <link>https://dev.to/pepicrft/cut-rust-compile-time-with-a-tuist-cargo-cache-2iek</link>
      <guid>https://dev.to/pepicrft/cut-rust-compile-time-with-a-tuist-cargo-cache-2iek</guid>
      <description>&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://tuist.dev/blog/2026/11/13/rust-support" rel="noopener noreferrer"&gt;tuist.dev&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Something big is happening in how we build software: with AI, the programming language is becoming an implementation detail. When an agent can write, translate, and test most of the code, the cost of writing it stops being the main input into which language and framework to use. And that's making many organizations question abstractions that existed largely because development time was expensive.&lt;/p&gt;

&lt;p&gt;React Native, Flutter, and Electron are good examples. They let a team write a feature once and ship it on several platforms, and that trade-off made a lot of sense when building the same thing twice was the bottleneck. Shopify went all-in on React Native in 2020. This year they &lt;a href="https://shopify.engineering/back-to-native" rel="noopener noreferrer"&gt;explained why they're going back to Swift and Kotlin&lt;/a&gt;: agents now do enough of the implementation, translation, testing, and review work that sharing code is no longer the deciding factor. They then rebuilt the Shopify app in 12 weeks.&lt;/p&gt;

&lt;p&gt;Discord is going in a similar direction, with a twist. They've been using Rust since 2018, and now they're &lt;a href="https://www.theverge.com/news/1027379/discord-ditching-electron-web-app" rel="noopener noreferrer"&gt;moving their clients off Electron and React Native&lt;/a&gt;: one Rust core shared by the desktop app and native interfaces on iOS and Android.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;a href="https://x.com/discord" rel="noopener noreferrer"&gt;Discord (@discord)&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;On the left is the Discord you use daily. And on the right is a new version we're working on, rebuilt in Rust&lt;/p&gt;

&lt;p&gt;Quoting Stanislav (@svishnevskiy): The new Discord client using less RAM is just part of the story. Clicking around feels instant, I can't go back. Check out the boot time.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Famkii6z1nf95bg0zlfkd.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Famkii6z1nf95bg0zlfkd.webp" alt="Two laptops side by side, the current Discord desktop client on the left and the Rust client on the right" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://x.com/discord/status/2118401057571369252" rel="noopener noreferrer"&gt;Nov 5, 2026 Â· Watch the video on X&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://x.com/discord" rel="noopener noreferrer"&gt;Discord (@discord)&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The new Rust client will feature the long-awaited mobile account switcher&lt;/p&gt;

&lt;p&gt;Quoting Stanislav (@svishnevskiy): Fast launch times are cool, but actual usage is what matters. Check out the speed of the long-requested mobile account switcher on iOS on the new Rust client. And yes it is just as fast on Android and Desktop.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fht5559uni79w96tt22d8.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fht5559uni79w96tt22d8.webp" alt="An iPhone running the new Rust-based Discord client, showing the messages list" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://x.com/discord/status/2120268703799574698" rel="noopener noreferrer"&gt;Nov 10, 2026 Â· Watch the video on X&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Moving more code to Rust has a well-known cost, though: compile time. A compiler that checks this much before your code runs has a lot of work to do, and the more code agents write, the more there is to compile and test.&lt;/p&gt;

&lt;p&gt;Today we're bringing Tuist to Rust. &lt;code&gt;tuist cargo&lt;/code&gt; runs the Cargo commands you already use and adds:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A build cache that reuses compilations across CI runs, fresh clones, and branches, including your own crates.&lt;/li&gt;
&lt;li&gt;Build insights, down to every &lt;code&gt;rustc&lt;/code&gt; invocation and how long it took.&lt;/li&gt;
&lt;li&gt;Test insights for &lt;code&gt;cargo test&lt;/code&gt;, with flaky test detection and quarantine.&lt;/li&gt;
&lt;li&gt;Test sharding and code coverage.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We tried it on Codex, OpenAI's open-source coding agent, whose Rust workspace has more than 130 crates and around 1,500 dependencies. We took two real commits from its &lt;code&gt;main&lt;/code&gt; branch, &lt;a href="https://github.com/openai/codex/commit/3f2603f2a2" rel="noopener noreferrer"&gt;one that changes &lt;code&gt;codex-cli&lt;/code&gt;&lt;/a&gt; and &lt;a href="https://github.com/openai/codex/commit/1c76c0bc08" rel="noopener noreferrer"&gt;one that changes &lt;code&gt;codex-core&lt;/code&gt;&lt;/a&gt;, and built each from a clean target directory, the way a CI job would:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Clean CI build of Codex after a change&lt;/strong&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Change&lt;/th&gt;
&lt;th&gt;Cargo&lt;/th&gt;
&lt;th&gt;Tuist&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Change to &lt;code&gt;codex-cli&lt;/code&gt; Â· a crate few others depend on&lt;/td&gt;
&lt;td&gt;2m 54s&lt;/td&gt;
&lt;td&gt;22s&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Change to &lt;code&gt;codex-core&lt;/code&gt; Â· the crate almost everything depends on&lt;/td&gt;
&lt;td&gt;2m 55s&lt;/td&gt;
&lt;td&gt;2m 07s&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;em&gt;Medians of five clean builds of &lt;code&gt;codex-cli&lt;/code&gt; with &lt;code&gt;CI&lt;/code&gt; set, on an Apple silicon Mac, with a local cache filled by the commit before the change.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;After the &lt;code&gt;codex-cli&lt;/code&gt; change, Tuist reused 162 of the 163 compilations and finished in 22 seconds instead of almost 3 minutes. &lt;code&gt;codex-core&lt;/code&gt; sits underneath almost everything, so a change there still recompiles 28 crates, and &lt;code&gt;codex-core&lt;/code&gt; alone takes about a minute. When nothing changed at all, the same clean build took 4 seconds.&lt;/p&gt;

&lt;h2&gt;
  
  
  Getting started with Tuist and Cargo
&lt;/h2&gt;

&lt;p&gt;Sign in or create an account at &lt;a href="https://tuist.dev" rel="noopener noreferrer"&gt;tuist.dev&lt;/a&gt;, then create a project in the dashboard and choose &lt;strong&gt;Cargo (Rust)&lt;/strong&gt; as its build system. Install the &lt;a href="https://tuist.dev/en/docs/guides/install-tuist" rel="noopener noreferrer"&gt;Tuist CLI&lt;/a&gt;, version 4.218.0 or later, and point your workspace's &lt;code&gt;Cargo.toml&lt;/code&gt; at the project:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight toml"&gt;&lt;code&gt;&lt;span class="k"&gt;[workspace.metadata.tuist]&lt;/span&gt;
&lt;span class="na"&gt;project&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"account/project"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Cargo leaves &lt;code&gt;metadata&lt;/code&gt; tables to other tools, so your build doesn't change, and the configuration lives next to the rest of your project's. If you'd rather keep it in its own file, a &lt;code&gt;tuist.toml&lt;/code&gt; at the root of the repository works too.&lt;/p&gt;

&lt;p&gt;Log in with &lt;code&gt;tuist auth login&lt;/code&gt;, and run your Cargo commands through Tuist:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;tuist cargo build --workspace
tuist cargo &lt;span class="nb"&gt;test&lt;/span&gt; --workspace
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Tuist passes your arguments to Cargo as they are, including features, toolchains, and test filters. Cargo keeps its output and exit code, even if a report can't be uploaded. There's no Rust dependency or Cargo plugin to add.&lt;/p&gt;

&lt;p&gt;If you'd rather keep typing &lt;code&gt;cargo&lt;/code&gt;, &lt;a href="https://mise.jdx.dev/" rel="noopener noreferrer"&gt;mise&lt;/a&gt; can wrap it for you:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight toml"&gt;&lt;code&gt;&lt;span class="k"&gt;[wrappers.cargo]&lt;/span&gt;
&lt;span class="na"&gt;command&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"tuist"&lt;/span&gt;
&lt;span class="na"&gt;args&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"cargo"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is particularly useful with coding agents: they keep running &lt;code&gt;cargo build&lt;/code&gt; and &lt;code&gt;cargo test&lt;/code&gt; without being reminded to add a prefix. In CI, authenticate through your provider's OpenID Connect identity or a token. The &lt;a href="https://tuist.dev/en/docs/guides/get-started/rust-project" rel="noopener noreferrer"&gt;Rust guide&lt;/a&gt; covers the details.&lt;/p&gt;

&lt;h2&gt;
  
  
  Cutting Rust compile time with a Cargo cache
&lt;/h2&gt;

&lt;p&gt;CI keeps compiling the same versions of the same dependencies, and when you switch branches or clean the target directory, you compile them again too. &lt;code&gt;tuist cargo build&lt;/code&gt; caches eligible compilations, both locally and through &lt;a href="https://tuist.dev/blog/2026/09/14/kura" rel="noopener noreferrer"&gt;Kura&lt;/a&gt;, our distributed cache, and &lt;code&gt;tuist cargo check&lt;/code&gt; and &lt;code&gt;tuist cargo clippy&lt;/code&gt; get the same treatment. Tuist hooks in through Cargo's &lt;a href="https://doc.rust-lang.org/cargo/reference/config.html#buildrustc-wrapper" rel="noopener noreferrer"&gt;rustc wrapper&lt;/a&gt;, so your toolchain and &lt;code&gt;Cargo.toml&lt;/code&gt; files stay as they are.&lt;/p&gt;

&lt;p&gt;Before Cargo starts, Tuist restores dependency units that an earlier build produced with the same toolchain, profile, and configuration, so Cargo finds them up to date. Cargo stays in charge of deciding what to rebuild. Then, for each compilation Cargo still runs, Tuist looks for matching outputs, first locally and then remotely, and compiles normally on a miss. That includes your own crates, which Cargo compiles incrementally in the &lt;code&gt;dev&lt;/code&gt; profile and sccache &lt;a href="https://github.com/mozilla/sccache#rust" rel="noopener noreferrer"&gt;can't cache&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Tuist can't put Cargo in a sandbox, so it watches what each compilation reads instead. Library crates are keyed by the sources the compiler reports, together with the toolchain. Build scripts, procedural macros, and native code are keyed by every file, directory, and environment variable they actually read, on Apple silicon Macs and on Linux with glibc. When a compilation does something Tuist can't account for, such as reaching the network, Tuist doesn't cache it.&lt;/p&gt;

&lt;p&gt;The Codex numbers above are medians of five runs on an Apple silicon Mac with &lt;code&gt;CI&lt;/code&gt; set, which since Cargo 1.99 also turns incremental compilation off, and a local cache filled by the commit before each change. Filling an empty cache costs something: that first build took 3m 59s, against about 2m 55s for plain Cargo. On your own machine, Cargo's incremental compilation already takes care of the crate you're editing, so the cache pays off when the target directory starts cold. The &lt;a href="https://tuist.dev/en/docs/guides/features/cache/rust" rel="noopener noreferrer"&gt;Cargo build cache guide&lt;/a&gt; lists what's cached today.&lt;/p&gt;

&lt;p&gt;We believe Cargo will eventually do this itself. The Cargo team is already &lt;a href="https://goals.rust-lang.org/2026/cargo-cross-workspace-cache.html" rel="noopener noreferrer"&gt;working towards a build cache shared across workspaces&lt;/a&gt;. Until it lands, we want Rust teams to have the most productive experience we can give them.&lt;/p&gt;

&lt;h2&gt;
  
  
  Build and test insights
&lt;/h2&gt;

&lt;p&gt;Every &lt;code&gt;tuist cargo&lt;/code&gt; command also reports to Tuist, so you can see where the time goes and keep the codebase healthy as it grows. The screenshots below are the real Tuist dashboard with our Codex runs.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fcmuu3ftwjmd2k1sp0ixw.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fcmuu3ftwjmd2k1sp0ixw.webp" alt="A Codex build showing its compiler jobs sorted by duration" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;An incremental build of Codex at commit &lt;code&gt;662daab&lt;/code&gt;. &lt;code&gt;codex_core&lt;/code&gt; took 2 minutes and 2 seconds of the build's 3 minutes and 24 seconds, and the crates that depend on it, like &lt;code&gt;codex_tui&lt;/code&gt; and &lt;code&gt;codex_app_server&lt;/code&gt;, only started once it finished.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;With Rust, Tuist supports:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://tuist.dev/en/docs/guides/features/build-insights/rust" rel="noopener noreferrer"&gt;Build insights&lt;/a&gt; for every Cargo command, with its duration, branch, commit, and Rust version, plus each &lt;code&gt;rustc&lt;/code&gt; invocation with its timing, warnings, and errors. Agents can read them through &lt;code&gt;tuist build cargo list&lt;/code&gt;, the REST API, and our MCP server.&lt;/li&gt;
&lt;li&gt;Test insights for plain &lt;code&gt;cargo test&lt;/code&gt; on stable Rust, including unit tests, integration tests, and doctests. Stable libtest only reports how long each test binary took, so Tuist records suite durations, not per-test timings.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://tuist.dev/en/docs/guides/features/test-insights/flaky-tests/rust" rel="noopener noreferrer"&gt;Flaky test detection&lt;/a&gt; across CI runs on the same commit, with muting and skipping from the dashboard. Muted tests keep running but don't fail the command, and if Tuist can't fetch the quarantine state, it runs without it rather than hiding failures.&lt;/li&gt;
&lt;li&gt;Test sharding by Cargo target, planned from historical durations.&lt;/li&gt;
&lt;li&gt;Code coverage through LLVM's source-based instrumentation, merged across a commit's runs and shards for each package and file.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fbooysbke8sqev69jzljl.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fbooysbke8sqev69jzljl.webp" alt="The Codex test cases dashboard with a muted test" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;No Codex test was flaky in our runs, so we muted &lt;code&gt;cancel_exits_run&lt;/code&gt; by hand to show what quarantine looks like. The test history records who muted it and when.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Keeping the team in the loop
&lt;/h2&gt;

&lt;p&gt;Tuist can also post to a Slack channel when a test becomes flaky, when test runs get slower, and with a regular report on how the project is doing.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;# codex-ci Â· Tuist&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Tuist&lt;/strong&gt; (APP) Â· 12:05 PM&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Daily codex Report&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Report period: Nov 12, 12:05 PM - Nov 13, 12:05 PM&lt;/p&gt;

&lt;p&gt;Previous period: Nov 11, 12:05 PM - Nov 12, 12:05 PM&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;ðŸ§ª Test Duration&lt;/strong&gt;&lt;br&gt;
Local: 336ms&lt;/p&gt;

&lt;p&gt;View analytics&lt;/p&gt;



&lt;p&gt;&lt;strong&gt;Tuist&lt;/strong&gt; (APP) Â· 12:18 PM&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;ðŸ¤– Auto-quarantine flaky tests&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;âš&amp;nbsp;ï¸ &lt;strong&gt;cancel_exits_run&lt;/strong&gt; in module &lt;code&gt;codex-file-search&lt;/code&gt; has been detected as flaky by automation &lt;strong&gt;Auto-quarantine flaky tests&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;View test case&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;em&gt;The daily report is the one Tuist generated for the Codex project in this post. The flaky test message shows what the default automation posts; no Codex test was flaky in our runs.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Flaky test events are also available through our &lt;a href="https://tuist.dev/en/docs/guides/features/agentic-coding/mcp#events" rel="noopener noreferrer"&gt;MCP Events interface&lt;/a&gt;, so an agent can start investigating a test's history before anyone notices it in CI.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's next
&lt;/h2&gt;

&lt;p&gt;We're working on test selection based on coverage: using what each test exercises to run only the tests affected by a change, instead of the whole suite. Coverage is the first step, and it's already there for Rust. We're also looking into remote execution, which spreads a build's compilations across many machines, so it can use more cores than any single runner has.&lt;/p&gt;

&lt;p&gt;If you run CI on &lt;a href="https://tuist.dev/blog/2026/11/04/runners" rel="noopener noreferrer"&gt;Tuist Runners&lt;/a&gt;, we already take this further: the cache nodes sit in the same rack as the machines that build, so every cache request stays on the local network. If you'd like to try it with your Rust project, &lt;a href="mailto:contact@tuist.dev"&gt;reach out&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;And if you want to keep your project defined in &lt;code&gt;Cargo.toml&lt;/code&gt; and go further, there's &lt;a href="https://github.com/tuist/once" rel="noopener noreferrer"&gt;Once&lt;/a&gt;, our own build system. It loads Cargo workspaces as they are and adds remote caching and remote execution, without asking you to describe your project again.&lt;/p&gt;

&lt;h2&gt;
  
  
  Come build with us
&lt;/h2&gt;

&lt;p&gt;If you maintain an open-source Rust project, our &lt;a href="https://tuist.dev/blog/2024/04/25/tuist-cloud-free-for-open-source" rel="noopener noreferrer"&gt;open-source program&lt;/a&gt; gives you free access to these features. &lt;a href="mailto:contact@tuist.dev"&gt;Send us your repository and Tuist account handle&lt;/a&gt;, and we'll help you get set up.&lt;/p&gt;

&lt;p&gt;And if you're moving more of your code to Rust at work, we'd love to hear about it. Where does the time go in your builds and tests? What have you had to build yourselves? To the folks at Discord: we've been following the new client with a lot of excitement, and we'd love to help you keep those builds fast as it grows. You can &lt;a href="https://cal.tuist.dev/team/tuist/tuist" rel="noopener noreferrer"&gt;book a call with us&lt;/a&gt; to talk about it.&lt;/p&gt;

</description>
      <category>rust</category>
      <category>devops</category>
      <category>ci</category>
      <category>opensource</category>
    </item>
    <item>
      <title>Continuous localization with L10N.md</title>
      <dc:creator>Pedro Piñera Buendía</dc:creator>
      <pubDate>Sat, 07 Nov 2026 07:17:22 +0000</pubDate>
      <link>https://dev.to/tuist/continuous-localization-with-l10nmd-n11</link>
      <guid>https://dev.to/tuist/continuous-localization-with-l10nmd-n11</guid>
      <description>&lt;p&gt;&lt;em&gt;Hola, soy Pedro. Schön, dass du da bist. नमस्ते, आपसे मिलकर खुशी हुई। Que bom ter você por aqui.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The world of languages is diverse, and &lt;strong&gt;languages are a tool for connection&lt;/strong&gt;. At Tuist, we want people to feel welcome asking questions, sharing what they know, and helping shape the product in their own language. Our community spans the world, including Korea, Turkey, Latin America, and China, and using English should not be a condition for taking part. That's why we care about making every surface of the product speak the languages of the communities we support, from the dashboard and our apps to the website and documentation. Someone should be able to learn about a feature, try it, and understand an error message without having to switch to English halfway through.&lt;/p&gt;

&lt;p&gt;We've always cared about this, but the localization tools we tried never kept up with how quickly we ship. A new feature can bring interface copy and documentation changes, with an announcement to follow. Our small team needs to keep all of that current in each language as development continues, and localization kept becoming a separate queue of work that someone had to coordinate.&lt;/p&gt;

&lt;p&gt;Earlier this year, we &lt;a href="https://tuist.dev/blog/2026/04/28/localization-with-llms" rel="noopener noreferrer"&gt;wrote about an experiment with LLM-powered localization&lt;/a&gt;. Since then, we've started using &lt;a href="https://github.com/glossia/glossia" rel="noopener noreferrer"&gt;Glossia&lt;/a&gt; at Tuist. Glossia is a &lt;strong&gt;personal open-source project of mine&lt;/strong&gt;, separate from Tuist, where I've been exploring how translation could keep up with software development. I call the approach &lt;strong&gt;continuous localization&lt;/strong&gt;: the system watches for changes, identifies which translations they affect, and translates and validates them in the background. Tuist gives me a real codebase and a multilingual community to learn from, although I still merge the translation pull requests myself.&lt;/p&gt;

&lt;h2&gt;
  
  
  Speed, quality, and cost
&lt;/h2&gt;

&lt;p&gt;For a long time, we felt caught between &lt;strong&gt;speed, quality, and cost&lt;/strong&gt;. If you wanted translations to be ready as soon as content appeared, with someone who understood the product taking care over the wording, you could bring translators into the team. They could follow development closely and ask questions while the work was happening. That is appealing, but it is also a substantial ongoing investment, especially when each additional language needs attention. For a team our size, it put a limit on how many communities we could support well.&lt;/p&gt;

&lt;p&gt;Working with external translators made it possible to buy that expertise without maintaining an in-house team for every language. Good translation still cost money, though, and batching the work introduced a delay. While a batch was being translated, the software kept changing. We would have to hold a release back or ship some content untranslated and catch up later. A product that switches languages between one screen and the next feels unfinished, and users have different expectations about how much of that inconsistency they are willing to accept. Translating a product once did not resolve the delivery problem.&lt;/p&gt;

&lt;p&gt;Automatic translation gave us speed at a lower cost, with less control over the result. It could help someone get the gist of a documentation page, but a short button label leaves much less room for ambiguity. A technical term might need to remain in English, a familiar expression might sound strange in another language, and marketing copy should still sound like us. We needed a way to influence those choices across the product and to improve them when someone pointed out a mistake. Asking a generic translation engine for another pass did not give us much of a system for doing that.&lt;/p&gt;

&lt;p&gt;My wife studied translation and loves languages, so these tradeoffs have also been the subject of many conversations at home. As LLMs became more capable, we started wondering whether models trained on so much language could change the setup. Could we keep translations moving with software, retain control over their quality, and make the cost low enough that adding a language would be a practical decision for a small team? Those conversations led me to start experimenting with Glossia.&lt;/p&gt;

&lt;h2&gt;
  
  
  A model is not a localization system
&lt;/h2&gt;

&lt;p&gt;A script that sends a file to an LLM with “translate this to Japanese” is a good starting point. You can get useful results quickly, and it gives you something concrete to try with your content. Once you run it regularly, though, you start needing more: a way to translate only what changed, somewhere to keep context that applies across files, and checks that the output still works in the repository. A change to the glossary should also update translations whose source text has not changed. Each of those requirements adds work around the model call, until you are building a localization system rather than a script that passes files to an LLM.&lt;/p&gt;

&lt;p&gt;My expectation is that producing a translation will become an increasingly solved part of the problem, much as producing code is becoming easier. That does not mean every translation is correct today, or that better models remove the need for judgment. Even a model that wrote excellent prose every time would need a surrounding system to decide which content to translate, give it the right context, integrate its output, and notice when an earlier translation needed to change. Those responsibilities become more important as the amount of content and the number of languages grow.&lt;/p&gt;

&lt;p&gt;In software engineering, people are exploring that surrounding system through &lt;a href="https://www.anthropic.com/engineering/effective-harnesses-for-long-running-agents" rel="noopener noreferrer"&gt;agent harnesses&lt;/a&gt;, feedback loops, and increasingly autonomous software factories. Deciding how an agent gets context and finds out that its work is wrong has become an engineering problem of its own. I wanted to explore those questions in localization, where a fluent model response can look convincing while violating a constraint that was never made explicit. Better wording alone would not give me enough confidence to let a system update a repository on its own.&lt;/p&gt;

&lt;p&gt;In our setup at Tuist, Glossia watches changes landing in &lt;code&gt;main&lt;/code&gt; and sends the affected content through that process in the background. The lower cost and reduced coordination have made it more practical for us to support new languages. We recently added Arabic alongside support for &lt;a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/dir" rel="noopener noreferrer"&gt;right-to-left layouts&lt;/a&gt;. The layout work still required product engineering, but we could add the language without first creating a new manual translation workflow and finding someone to keep it moving after every release.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ffap7jcqindec1bxx62f9.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ffap7jcqindec1bxx62f9.webp" alt="Tuist's marketing page in Arabic, with right-to-left navigation and layout" width="800" height="583"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Translation context with L10N.md
&lt;/h2&gt;

&lt;p&gt;Glossia takes its context from &lt;a href="https://glossia.ai/docs/reference/l10n-md" rel="noopener noreferrer"&gt;&lt;code&gt;L10N.md&lt;/code&gt; files&lt;/a&gt;, much as coding agents read &lt;a href="https://agents.md" rel="noopener noreferrer"&gt;&lt;code&gt;AGENTS.md&lt;/code&gt;&lt;/a&gt;. These are Markdown files with frontmatter, kept alongside the content they describe. At the root of the repository, we can explain our voice, our audience, and the product names that should stay unchanged. A file deeper in the tree adds guidance for its own area. Marketing copy can be conversational, while an error message needs to help someone understand what went wrong. Both inherit the general context without having to duplicate it.&lt;/p&gt;

&lt;p&gt;That hierarchy also supports language-specific guidance at each level through &lt;code&gt;L10N/&amp;lt;locale&amp;gt;.md&lt;/code&gt; files. We might have a convention for Spanish throughout the repository and a more specific instruction for Spanish interface copy in one part of it. The model receives the applicable context from the general to the specific, including the relevant locale guidance. This lets us describe how we want Tuist to sound overall while still giving a particular language or part of the codebase the attention it needs.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Feqwtjqnh5v6k82m59kls.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Feqwtjqnh5v6k82m59kls.webp" alt="Repository layout showing root and server L10N.md context inherited by Spanish and Japanese locale overrides" width="800" height="419"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here is a shortened excerpt from &lt;a href="https://github.com/tuist/tuist/blob/main/server/L10N.md" rel="noopener noreferrer"&gt;Tuist's &lt;code&gt;server/L10N.md&lt;/code&gt;&lt;/a&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="nn"&gt;---&lt;/span&gt;
&lt;span class="na"&gt;sources&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;priv/gettext/*.pot"&lt;/span&gt;&lt;span class="err"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;priv/gettext/{locale}/LC_MESSAGES/{basename}.po"&lt;/span&gt;
&lt;span class="na"&gt;targets&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;ar&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Arabic"&lt;/span&gt;
  &lt;span class="na"&gt;es&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Spanish"&lt;/span&gt;
  &lt;span class="na"&gt;ja&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Japanese"&lt;/span&gt;
&lt;span class="na"&gt;glossary&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;source&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;cache miss&lt;/span&gt;
    &lt;span class="na"&gt;definition&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Requested data was not found in the cache. This is not a failed build or test.&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;source&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;flaky tests&lt;/span&gt;
    &lt;span class="na"&gt;definition&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Tests that pass and fail intermittently without relevant code changes.&lt;/span&gt;
&lt;span class="nn"&gt;---&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The real file includes our other target languages and more context. The &lt;a href="https://glossia.ai/docs/reference/glossary" rel="noopener noreferrer"&gt;glossary in the frontmatter&lt;/a&gt; establishes what terms mean, and locale files can supply their preferred translations. For example, our &lt;a href="https://github.com/tuist/tuist/blob/main/server/L10N/es.md" rel="noopener noreferrer"&gt;Spanish glossary&lt;/a&gt; uses &lt;code&gt;tests&lt;/code&gt; for “tests” and &lt;code&gt;funcionalidades&lt;/code&gt; for “features.” Our &lt;a href="https://github.com/tuist/tuist/blob/main/server/L10N/ja.md" rel="noopener noreferrer"&gt;Japanese guidance&lt;/a&gt; asks for established developer vocabulary and natural Japanese sentence structure, rather than carrying over English word order. That gives the model information it cannot reliably infer from an isolated string. A cache miss must not turn into a failed build, and “shipping” in our content usually means delivering software rather than moving a parcel.&lt;/p&gt;

&lt;p&gt;We also want to choose models according to the language being translated. Models are not trained equally across languages, and the one whose Japanese output works best for a team might not be its preferred choice for Portuguese. Glossia supports locale-specific model choices so that those decisions can be made independently. The rest of the workflow can stay the same while we learn which model works well for a language and adjust the routing. Improving the translation should not require rebuilding the integration around a different provider.&lt;/p&gt;

&lt;h2&gt;
  
  
  Incremental translation, borrowed from build systems
&lt;/h2&gt;

&lt;p&gt;Sending everything to a model on every commit would quickly become expensive, so Glossia needs to know &lt;strong&gt;which translations can be skipped&lt;/strong&gt;. Working on build systems at Tuist has given me years of experience with dependency graphs and incremental execution, and I wanted to apply that experience to languages. A compiler should not rebuild an unchanged target whose inputs are still the same. A localization system should be able to make an equivalent decision about content, while accounting for the instructions given to a model as well as the source text.&lt;/p&gt;

&lt;p&gt;A translation depends on its source text and the applicable context, including language-specific guidance, glossary entries, and generation settings. Context can also live outside the repository: a shared voice or terminology definition in the Glossia platform can affect content in the repository. Glossia tracks these relationships as a dependency graph and records its translation baselines in lockfiles under &lt;code&gt;.glossia/&lt;/code&gt;. Here is an excerpt from the Spanish lockfile for our marketing strings, with hashes shortened and the other nodes and detailed metadata omitted:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"baseline_schema_version"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"hash"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"96b2b2ed806a..."&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"hash_tree"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"root"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"children"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
          &lt;/span&gt;&lt;span class="nl"&gt;"hash"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"b91aa5f24722..."&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
          &lt;/span&gt;&lt;span class="nl"&gt;"kind"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"source"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
          &lt;/span&gt;&lt;span class="nl"&gt;"label"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"server/priv/gettext/marketing.pot"&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
          &lt;/span&gt;&lt;span class="nl"&gt;"hash"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"4d5c44a3e749..."&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
          &lt;/span&gt;&lt;span class="nl"&gt;"kind"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"context_bundle"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
          &lt;/span&gt;&lt;span class="nl"&gt;"label"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"context"&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;These are &lt;strong&gt;&lt;a href="https://en.wikipedia.org/wiki/Merkle_tree" rel="noopener noreferrer"&gt;Merkle trees&lt;/a&gt;&lt;/strong&gt;: each node's hash incorporates its own metadata and the hashes of its children. Change a leaf, such as the Spanish context, and the hashes change all the way up to the root. Comparing root hashes tells us whether the translation's inputs are unchanged; comparing the branches tells us where they differ. Glossia's &lt;a href="https://github.com/glossia/glossia/blob/main/app/lib/glossia/translations/locks.ex" rel="noopener noreferrer"&gt;implementation&lt;/a&gt; applies this to source content, generation settings, and context, so a glossary update can invalidate a translation just as a changed dependency invalidates a build artifact.&lt;/p&gt;

&lt;p&gt;The full context subtree includes repository guidance and organization-level voice and terminology. Keeping those individual nodes lets us explain &lt;strong&gt;why a translation was triggered&lt;/strong&gt;, with more detail than a single opaque hash could provide. We can distinguish a source edit from a change to our Spanish guidance or an update to shared voice in the platform. When a translation runs unexpectedly, we can inspect the inputs that caused it, just as we would investigate why a build target was invalidated.&lt;/p&gt;

&lt;p&gt;Unchanged inputs let us skip the translation, while changes invalidate the affected output. A change to Spanish guidance should not force Japanese content through the model; a shared voice change can have a much wider reach, even if nobody edited the source strings. This also gives us a way to improve existing translations by changing context, instead of waiting for their English source to be touched. Applying what I've learned about build systems to languages has been one of the most enjoyable parts of the project, and it helps keep the cost of continuous translation manageable.&lt;/p&gt;

&lt;h2&gt;
  
  
  Translated does not mean ready to merge
&lt;/h2&gt;

&lt;p&gt;One of our frustrations with previous setups was where their responsibility ended. They would pull content out of the repository, or have us push it into another system, do the translation there, and send it back as a pull request. The returned content had not necessarily been checked against the repository that would consume it. A developer then had to decide whether to merge changes in languages they might not read, wait for CI to tell them whether the files integrated, and investigate if something broke. It is a difficult position to put someone in when the whole point was to take translation work off their plate.&lt;/p&gt;

&lt;p&gt;Taking responsibility for integration means providing compute and working with an unfamiliar repository's toolchain, which helps explain why translation tools often stop at that boundary. I wanted Glossia to take on that work too. Alongside translation, it uses an LLM to look at the codebase, determine which validations are appropriate for the content changes, and run them. &lt;strong&gt;Validation happens inside the translation workflow&lt;/strong&gt;, before the result comes back to us. CI remains an independent check, rather than our first opportunity to discover that the generated files are invalid.&lt;/p&gt;

&lt;p&gt;Some of the problems are familiar from generating code. If you hand an entire JSON file to a model and ask it to translate the contents, the result can contain good prose and invalid syntax. There is no reason to leave that entirely to model judgment when file-format handling and a parser can constrain and check it. Interpolation variables, links, and application-specific requirements introduce other constraints we need to account for. Passing those checks still would not establish that the Japanese sounds natural, so we also need feedback that addresses the language itself. Different mistakes call for different kinds of validation.&lt;/p&gt;

&lt;p&gt;I would eventually like to trust the system enough to let translations land directly in &lt;code&gt;main&lt;/code&gt;. Seeing people explore that level of autonomy for coding makes me curious about what it would take for localization. &lt;strong&gt;Glossia still opens pull requests at Tuist, and I still merge them.&lt;/strong&gt; Models can hallucinate or miss instructions, and I expect to keep discovering cases Glossia does not handle well. Each of those cases needs investigation and a change to the process so the same mistake is less likely next time. In coding, that can mean an adversarial review loop; I'm exploring what an equivalent process should look like for translations before removing the manual merge step.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ftt2mts30prsnoowfk0ua.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ftt2mts30prsnoowfk0ua.webp" alt="A Glossia translation pull request on GitHub, showing source commits, translation progress, and a per-language summary" width="800" height="486"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/tuist/tuist/pull/15450" rel="noopener noreferrer"&gt;This translation pull request&lt;/a&gt; shows the information Glossia brings back to the repository: the source commits it is catching up with, progress through the translation run, and a breakdown by language.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where people fit
&lt;/h2&gt;

&lt;p&gt;I'm also interested in &lt;strong&gt;how people can contribute when translation happens continuously&lt;/strong&gt;. Better models will help, but they will not automatically know how our community talks about the product. Someone using Tuist in Japanese might notice wording that is technically understandable but awkward. A Spanish-speaking contributor might know that a term we chose means something different in this context. Those observations should be able to improve the system, including content that has already been translated.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.linkedin.com/in/gamehelper/" rel="noopener noreferrer"&gt;Lee Young-Jun&lt;/a&gt;, a member of our Korean community, keeps asking me how he can help with the system. Every time, I feel we are missing the tools to make that easy. &lt;strong&gt;Someone should be able to give feedback where they encounter the text&lt;/strong&gt;, without knowing which file contains it or how to capture the surrounding context for a translator or a model. They already know what sounds wrong and can help us understand why; locating a string in a codebase should not be the price of contributing that knowledge.&lt;/p&gt;

&lt;p&gt;It feels crazy that, in 2026, this is still an unresolved problem in so many translation systems. I think part of the reason is that we keep looking at localization through the same lens we used thirty years ago: extract strings, send them somewhere to be translated, then import the results. That workflow gives us somewhere to manage files and translation jobs, but it does little for someone like Lee who wants to help while using the product. I'd like Glossia to make that contribution possible without requiring him to learn how our localization pipeline works.&lt;/p&gt;

&lt;p&gt;Professional translators can bring their editorial judgment to that work, and I also want to make room for people who know a language and the product well without being translators by profession. They should be able to help with terminology or voice without taking on entire files of strings. Many of those people will not be developers, so asking them to navigate a repository and open a Git pull request would be a poor interface. This is why voice, glossary, and context also live in the Glossia platform: they need to be accessible to the people best placed to shape them. The system should help turn feedback about a phrase into useful guidance, rather than expecting contributors to arrive with that guidance already written.&lt;/p&gt;

&lt;p&gt;The contribution model I'd like to reach resembles a pull request, but for language guidance. An external contributor could propose a glossary correction or a change to how the product should sound, and the team could review that proposal before accepting it. Acceptance would update the context that the translation system uses. Because the graph includes those dependencies, the change could trigger the affected translations automatically, even with no source-code changes. For example, an accepted Spanish terminology correction could cause the relevant Spanish content to be translated again, while leaving other languages alone. That would give a contributor a way to improve translations beyond the single phrase they happened to encounter.&lt;/p&gt;

&lt;h2&gt;
  
  
  Localization that moves with the product
&lt;/h2&gt;

&lt;p&gt;At Tuist, continuous localization is already making it easier to keep translations current and support more languages. We still review and merge the results. With Glossia, I want to keep working toward a setup where the system can take responsibility for delivery and people can contribute their knowledge of a language without having to manage a translation queue. The contribution workflow described above is still something I want to build toward.&lt;/p&gt;

&lt;p&gt;I'd love to see more products embrace the diversity of languages as we're trying to do at Tuist. There are people who would use what you're building, contribute to it, or feel more at home in its community if it spoke their language. If you'd like to make that happen in your own product, &lt;a href="mailto:pedro@tuist.io"&gt;get in touch&lt;/a&gt;. I'm happy to share what we've learned and help you find a way to make localization work for your team.&lt;/p&gt;

</description>
      <category>localization</category>
      <category>i18n</category>
      <category>llm</category>
      <category>opensource</category>
    </item>
    <item>
      <title>Tuist Runners: Going down to the bare metal on macOS and Linux</title>
      <dc:creator>Pedro Piñera Buendía</dc:creator>
      <pubDate>Thu, 05 Nov 2026 15:15:42 +0000</pubDate>
      <link>https://dev.to/tuist/tuist-runners-going-down-to-the-bare-metal-on-macos-and-linux-1lje</link>
      <guid>https://dev.to/tuist/tuist-runners-going-down-to-the-bare-metal-on-macos-and-linux-1lje</guid>
      <description>&lt;p&gt;Today, we're very excited to share what we've been building over the past months: &lt;strong&gt;Tuist Runners&lt;/strong&gt;, managed macOS and Linux runners for GitHub Actions, GitLab CI, Buildkite, and more in the future. The Macs run in a rack that we own, in a data center in Berlin, and that rack has its own colocated cache nodes for the most optimal performance.&lt;/p&gt;

&lt;p&gt;Getting here took us down a path we didn't expect to take when we started working on productizing caching three years ago. We went from making projects faster regardless of where they run, to buying Mac minis and racking them ourselves. This post is about why and how we did it, and what you get when your CI runs next to its cache on Tuist compute.&lt;/p&gt;

&lt;h2&gt;
  
  
  Making projects faster, wherever they run
&lt;/h2&gt;

&lt;p&gt;Tuist has always been about impeccable developer experience and productive developer environments. Long before runners were on our radar, we invested in optimizations that work in &lt;strong&gt;any&lt;/strong&gt; environment: the &lt;a href="https://tuist.dev/en/docs/guides/features/cache" rel="noopener noreferrer"&gt;module cache&lt;/a&gt; that turns your modules into prebuilt binaries, &lt;a href="https://tuist.dev/en/docs/guides/features/selective-testing" rel="noopener noreferrer"&gt;selective testing&lt;/a&gt;, the remote &lt;a href="https://tuist.dev/blog/2025/10/22/xcode-cache" rel="noopener noreferrer"&gt;Xcode compilation cache&lt;/a&gt;, the Gradle build cache, &lt;a href="https://tuist.dev/blog/2026/03/25/test-sharding" rel="noopener noreferrer"&gt;test sharding&lt;/a&gt;, and the build and test insights that tell you where the time goes in the first place. You can use all of these on your laptop, on GitHub-hosted runners, or on a CI fleet you manage yourself, and that's not changing.&lt;/p&gt;

&lt;p&gt;But once the build stops doing unnecessary work, the remaining work changes its nature. Instead of compiling, your build is now mostly &lt;em&gt;fetching&lt;/em&gt;: asking the cache whether an artifact exists, and downloading it if it does.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why cache proximity matters for CI
&lt;/h2&gt;

&lt;p&gt;When we &lt;a href="https://tuist.dev/blog/2025/10/22/xcode-cache" rel="noopener noreferrer"&gt;launched the remote Xcode cache&lt;/a&gt;, we wrote that latency is key: the build system makes thousands, sometimes tens of thousands, of cache requests per build, and every single one pays for the round trip. We then built &lt;a href="https://tuist.dev/blog/2026/09/14/kura" rel="noopener noreferrer"&gt;Kura&lt;/a&gt;, our distributed cache, and placed it in regions close to where builds run.&lt;/p&gt;

&lt;p&gt;However, there's a ceiling to how far that can go. When you don't own the environment the build runs in, the last stretch between the machine and the cache is someone else's network. Your artifacts travel over the public internet, share bandwidth with everything else that machine's provider is doing, and pay a round trip measured in milliseconds rather than fractions of one. We went deeper into these constraints in &lt;a href="https://tuist.dev/blog/2026/08/25/the-physics-of-build-systems" rel="noopener noreferrer"&gt;The physics of build systems&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The only way past that ceiling is to own both the machines that run the builds and the cache that serves them, placed right next to each other. We first tried to do this with what's available on the market: we ran the first version of Tuist Runners on rented Apple silicon and colocated cache nodes with that fleet as closely as the provider allowed. It worked, and it taught us a lot, but none of the rented options would work for us long-term. Renting a Mac mini costs about as much in a few months as buying one, and, more importantly, we'd always depend on someone else's rack layout, network, and how quickly they are able to provide us with new machines, like the recently-introduced M5 Pros.&lt;/p&gt;

&lt;p&gt;In our own rack, the cache lives on two storage nodes, one on each top-of-rack switch. They run the rack's own Kura cache region, replicating with the rest of the Kura mesh, and they store the cache volumes that the runners attach to. When a Mac mini asks for a cache artifact, the request goes to its top-of-rack switch and straight to the storage node on it, with a round trip measured in fractions of a millisecond.&lt;/p&gt;

&lt;p&gt;To get a feel for what that means for a build: the Xcode compilation cache makes many small requests, so it's dominated by the round trip, while the module cache downloads fewer, larger binaries, so it's dominated by bandwidth. The rack wins on both:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; The original post includes an interactive cache-proximity simulator (pick a workload and press play). DEV.to can’t host that widget — &lt;a href="https://tuist.dev/blog/2026/11/04/runners#why-cache-proximity-matters-for-ci" rel="noopener noreferrer"&gt;try it on the original post&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Illustrative distances used there (16 requests in flight, connections already established, every request a cache hit; disk and server processing excluded):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;In the rack&lt;/strong&gt; · 0.3 ms round trip, 1 GB/s&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A nearby region, over the internet&lt;/strong&gt; · 20 ms round trip, 100 MB/s&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Another continent&lt;/strong&gt; · 120 ms round trip, 25 MB/s&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  How we got here
&lt;/h2&gt;

&lt;p&gt;None of this happened overnight.&lt;/p&gt;

&lt;p&gt;In 2025, we were heads-down on making builds do less work, wherever they ran. We kept improving the module cache and selective testing, shipped &lt;a href="https://tuist.dev/blog/2025/06/05/build-insights" rel="noopener noreferrer"&gt;build insights&lt;/a&gt; so that teams could see where their time goes, and in October, launched the remote Xcode compilation cache. While benchmarking it, one thing kept showing up in the numbers: the cache was only as fast as the network between the cache and the machine itself.&lt;/p&gt;

&lt;p&gt;At the beginning of 2026, we stepped outside of the Apple ecosystem. The Tuist CLI &lt;a href="https://tuist.dev/blog/2026/02/16/linux" rel="noopener noreferrer"&gt;started running on Linux&lt;/a&gt; in February, and two weeks later, Tuist &lt;a href="https://tuist.dev/blog/2026/03/02/gradle" rel="noopener noreferrer"&gt;came to Gradle&lt;/a&gt;. Suddenly, the same question applied to Android teams, too: where do their builds actually run, and how far is that from the cache?&lt;/p&gt;

&lt;p&gt;Earlier this year, we launched the first version of Tuist Runners, initially used just by ourselves, using macOS VMs on rented Apple silicon and Linux microVMs on bare-metal servers, both dispatched by the Tuist server.&lt;/p&gt;

&lt;p&gt;The more we tried to squeeze as much performance as possible from the environments provided to us, the more we ran into the limits of machines we didn't own. We couldn't put the cache exactly where we wanted it, we couldn't choose the network in between, and when new hardware like the M5 Pro Mac minis came out, getting it was up to someone else. So in September, we &lt;a href="https://tuist.dev/blog/2026/09/12/the-new-tuist" rel="noopener noreferrer"&gt;announced&lt;/a&gt; that we were going down to the metal.&lt;/p&gt;

&lt;p&gt;It turns out that going down to the metal is much less about just buying machines for the rack and much more about everything around them. None of us had done this before. A few years ago, a team our size probably couldn't have taken it on, but today, so much of that knowledge is available through AI models. They didn't take away learning by doing, nor the operational work that goes well beyond designing the rack, but they made it possible for a small team like ours. The rest, we learned one conversation at a time:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;A home for the rack:&lt;/strong&gt; We talked to colocation providers in Berlin and settled on NTT's Berlin data center. After a tour of the facility with the team, we had to walk their electrical engineers through how we'd give Mac minis, which have a single power supply, access to both of the rack's power feeds with our own transfer switches and switched PDUs.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Internet:&lt;/strong&gt; A rack comes with space and power, but not with an internet connection. We needed to sign a contract with a carrier to get a fibre cross-connect between their room and ours, coordinated between them and the data center.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Mac minis:&lt;/strong&gt; We worked with the business team at our local Apple Store in Berlin to order and lease M5 Pro Mac minis in bulk, registered to enroll into our device management the moment they're turned on.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Insurance:&lt;/strong&gt; Expensive hardware sitting in a building we don't own needs to be insured, so we extended our electronics insurance to cover a colocation site.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Our own IP range:&lt;/strong&gt; Shortly after we took over the rack, a team with a GitHub IP allow list couldn't check out their code from our runners. So we became a RIPE member, got our own autonomous system and IPv4 range, and started announcing it from the rack over BGP. Every team now has a single, stable range to allow.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;On October 6, we took over the rack. We loaded a shared car with rack shelves, cables, and a big blue IKEA bag of hardware, and drove to the data center, where the first boxes of Mac minis were waiting to be unpacked:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fhgipr9qshm1xa0h8pydx.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fhgipr9qshm1xa0h8pydx.jpg" alt="On the left, a team member next to a car with its trunk open in front of the data center, with a blue IKEA bag of rack shelves on the ground. On the right, a Mac mini labeled ber1-runner-b01 sitting on a stack of Mac mini boxes inside the rack." width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And here's us on our way to the data center that day:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F5g7c8mwgmuldrd328qxo.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F5g7c8mwgmuldrd328qxo.jpg" alt="Still from rack install day — driving to the data center" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;a href="https://tuist.dev/marketing/videos/runners-rack-install-day.mp4" rel="noopener noreferrer"&gt;Watch the rack install day video&lt;/a&gt; (or &lt;a href="https://tuist.dev/blog/2026/11/04/runners#how-we-got-here" rel="noopener noreferrer"&gt;on the original post&lt;/a&gt;).&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Our goal is to run this at industrial scale, but every fleet starts somewhere.&lt;/p&gt;

&lt;h2&gt;
  
  
  Inside the rack
&lt;/h2&gt;

&lt;p&gt;Here's our rack in Berlin:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; The original post has a clickable front-view diagram of our Berlin rack. DEV.to can’t host that interactive diagram — &lt;a href="https://tuist.dev/blog/2026/11/04/runners#inside-the-rack" rel="noopener noreferrer"&gt;explore it on the original post&lt;/a&gt;. A simplified front view: positions are illustrative; the devices and how they connect come from the rack’s open-source site definition.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;When the knowledge to build something like this is available to anyone, keeping our implementation closed isn't where the value lies. The value we provide is in packaging it all together, operating it, and offering a service that's ready to use. So &lt;strong&gt;even our rack definition is open source&lt;/strong&gt;: the &lt;a href="https://github.com/tuist/tuist/blob/main/infra/rack-switch-fleet/sites/larch.json" rel="noopener noreferrer"&gt;site definition&lt;/a&gt; describes every device, port, and power feed in the rack, and the &lt;a href="https://github.com/tuist/tuist/blob/main/infra/rack-switch-fleet/cables/larch.md" rel="noopener noreferrer"&gt;cable schedule&lt;/a&gt; and the switch configuration are rendered from it. The code that takes a freshly unboxed Mac mini to a runner accepting jobs lives in the same &lt;a href="https://github.com/tuist/tuist/tree/main/infra" rel="noopener noreferrer"&gt;repository&lt;/a&gt; as everything else we build. If you've ever wondered how to run Macs at scale, you're welcome to read along, and we'd love to hear your ideas.&lt;/p&gt;

&lt;h2&gt;
  
  
  Beyond colocating the cache
&lt;/h2&gt;

&lt;p&gt;When we started building runners, we didn't want to stop at colocating the cache, although that alone brings a lot of benefits. Owning the environment means we can optimize the parts of a CI job that have nothing to do with compilation, and that's where a lot of the time goes once your build itself is fast.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Cache volumes:&lt;/strong&gt; Every runner starts as a fresh, ephemeral VM, but that doesn't mean it has to start cold. Cache volumes are persistent disks, kept per repository, that a job attaches on start. The Xcode compilation cache, the module cache, and Gradle's caches each take a single step to keep on them, and you can add any other directory, like &lt;code&gt;node_modules&lt;/code&gt;, under a key you choose. The runner prefers a machine that already holds your volumes, saves only what a job changed, and never makes a job wait for a volume to download.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cached checkouts:&lt;/strong&gt; Cloning a large repository from scratch on every job adds up. Runners keep checkouts warm, so &lt;code&gt;actions/checkout&lt;/code&gt; mostly fetches what changed.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ecosystem-specific actions:&lt;/strong&gt; We build actions for the ecosystems we integrate with deeply. For example, &lt;a href="https://github.com/tuist/tuist/tree/main/.github/actions/install" rel="noopener noreferrer"&gt;&lt;code&gt;tuist/install&lt;/code&gt;&lt;/a&gt; installs your Swift package dependencies with &lt;a href="https://tuist.dev/blog/2026/07/16/swifterpm" rel="noopener noreferrer"&gt;SwifterPM&lt;/a&gt; and keeps the resolved state on a cache volume. That brought SwiftPM resolution from &lt;strong&gt;around two minutes down to just a couple of seconds&lt;/strong&gt;. And since it falls back to GitHub's cache everywhere else, the same step works on any runner.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Linux, too:&lt;/strong&gt; Linux jobs get cache volumes and cached checkouts, too, along with Docker, a pull-through cache for container images, and hardware-accelerated virtualization through &lt;code&gt;/dev/kvm&lt;/code&gt;, so you can run Android emulators, including Gradle Managed Devices, without any setup.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Build and CI insights, from code to the metal
&lt;/h2&gt;

&lt;p&gt;Runners are not a separate product bolted onto Tuist. Because we own every layer, the insights go all the way down: from your builds and tests, through the CI job and its cache, to the metal and the node that ran the job. A job running on Tuist Runners shows up in the same dashboard as your build insights, test insights, and cache analytics: its steps, live logs, machine metrics, the cache volumes it used, and the builds and tests that ran inside it. When a job misbehaves, you can connect to the running machine and see what's going on. Having all of that context in one place is what lets you and your agents understand the whole system, rather than piecing it together across separate services.&lt;/p&gt;

&lt;p&gt;And everything is agent-first. Through a &lt;a href="https://tuist.dev/en/docs/guides/features/agentic-coding/mcp" rel="noopener noreferrer"&gt;single MCP server&lt;/a&gt;, your agent can list runner jobs, read their logs and steps, look into cache volume analytics, and correlate all of that with your cache insights and build insights, then manage your runner profiles through the same MCP, the CLI, or the API. One MCP, and all of your CI and build system-specific data in one place.&lt;/p&gt;

&lt;p&gt;So far, our focus has been on iOS and Android with Gradle. We believe that integrating deeply with an ecosystem is what makes the experience great: understanding a build system well enough to cache the right things, to make dependency installation fast, and to show insights that actually mean something to you. That's why we're taking the same approach as we expand to Elixir, &lt;a href="https://tuist.dev/en/docs/guides/get-started/rust-project" rel="noopener noreferrer"&gt;Rust&lt;/a&gt;, and &lt;a href="https://tuist.dev/blog/2026/09/09/bazel" rel="noopener noreferrer"&gt;Bazel&lt;/a&gt;, and to &lt;a href="https://tuist.dev/blog/2026/09/12/the-new-tuist" rel="noopener noreferrer"&gt;Once&lt;/a&gt;, our own build system.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to try Tuist Runners
&lt;/h2&gt;

&lt;p&gt;We're still early in this journey and we're continuously adding Mac minis to ensure to meet the growing demand. This is a capital-intensive exercise and for now, we're keeping &lt;strong&gt;Tuist Runners invite-only&lt;/strong&gt; to make sure we have enough capacity to onboard new customers.&lt;/p&gt;

&lt;p&gt;That said, we'd love for you to take them for a spin. If you'd like an invite, send us an email at &lt;a href="mailto:contact@tuist.dev"&gt;contact@tuist.dev&lt;/a&gt; or reach out in our &lt;a href="https://slack.tuist.dev" rel="noopener noreferrer"&gt;Slack&lt;/a&gt;, and tell us a bit about your project and your CI. You can also read more about how runners work in our &lt;a href="https://tuist.dev/en/docs/guides/features/runners" rel="noopener noreferrer"&gt;documentation&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;And if you're already on GitHub Actions, adopting them is a one-line:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight diff"&gt;&lt;code&gt; jobs:
   build:
&lt;span class="gd"&gt;-    runs-on: macos-latest
&lt;/span&gt;&lt;span class="gi"&gt;+    runs-on: tuist-macos
&lt;/span&gt;     steps:
       - uses: actions/checkout@v4
       - run: tuist test
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;macOS runners start at $0.05 per minute on an M5 Pro Mac mini, Linux starts at $0.001, and every plan comes with free minutes. You'll find every rate on our &lt;a href="https://tuist.dev/pricing#runners" rel="noopener noreferrer"&gt;pricing page&lt;/a&gt;. As the utilization of our fleet grows, expect the price to drop down further. We've already dropped our initial pay-as-you-go price for macOS from $0.075 to $0.05, and we don't plan to stop there. Help us get there and make a difference in the industry!&lt;/p&gt;

</description>
      <category>ci</category>
      <category>macos</category>
      <category>devops</category>
      <category>tuist</category>
    </item>
    <item>
      <title>Native edges: principles for native apps with a shared core</title>
      <dc:creator>Pedro Piñera Buendía</dc:creator>
      <pubDate>Wed, 04 Nov 2026 17:27:10 +0000</pubDate>
      <link>https://dev.to/tuist/native-edges-principles-for-native-apps-with-a-shared-core-4ff1</link>
      <guid>https://dev.to/tuist/native-edges-principles-for-native-apps-with-a-shared-core-4ff1</guid>
      <description>&lt;p&gt;For a long time, building a client for every platform you cared about was expensive. You wrote every screen twice, fixed every bug twice, and either staffed a team per platform or decided which platforms your users would have to live without. So the industry did what it usually does and found ways to make that cost bearable.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.electronjs.org" rel="noopener noreferrer"&gt;Electron&lt;/a&gt;, &lt;a href="https://reactnative.dev" rel="noopener noreferrer"&gt;React Native&lt;/a&gt;, and more recently &lt;a href="https://tauri.app" rel="noopener noreferrer"&gt;Tauri&lt;/a&gt; came out of that. They gave teams a dynamic runtime, hot reloading, and the whole ecosystem of web libraries, so one team could ship to several platforms at once. And it worked: &lt;a href="https://slack.com" rel="noopener noreferrer"&gt;Slack&lt;/a&gt;, &lt;a href="https://linear.app" rel="noopener noreferrer"&gt;Linear&lt;/a&gt;, &lt;a href="https://discord.com" rel="noopener noreferrer"&gt;Discord&lt;/a&gt;, &lt;a href="https://www.notion.com" rel="noopener noreferrer"&gt;Notion&lt;/a&gt;, and &lt;a href="https://code.visualstudio.com" rel="noopener noreferrer"&gt;Visual Studio Code&lt;/a&gt; run on a web stack, and many of us have them open all day. &lt;a href="https://www.raycast.com" rel="noopener noreferrer"&gt;Raycast&lt;/a&gt; went the same way to get to Windows. &lt;a href="https://www.raycast.com/blog/a-technical-deep-dive-into-the-new-raycast" rel="noopener noreferrer"&gt;Raycast 2.0&lt;/a&gt; shares a React and TypeScript frontend between macOS and Windows and loads it in each platform's web view, and the team was open about why: hiring, the UI components the web already has, consistent extensions, and iteration speed. Those are good reasons.&lt;/p&gt;

&lt;p&gt;Coding agents changed part of that math. Writing a &lt;a href="https://developer.apple.com/xcode/swiftui/" rel="noopener noreferrer"&gt;SwiftUI&lt;/a&gt; view and then its &lt;a href="https://developer.android.com/compose" rel="noopener noreferrer"&gt;Jetpack Compose&lt;/a&gt; twin used to be the expensive part, and today an agent writes most of it while you review. What's still expensive is compiling it, and if you've ever sat waiting on &lt;a href="https://developer.apple.com/xcode/" rel="noopener noreferrer"&gt;Xcode&lt;/a&gt; or &lt;a href="https://gradle.org" rel="noopener noreferrer"&gt;Gradle&lt;/a&gt;, you know how much of a day goes into that. At Tuist we've spent years chipping away at that problem, with &lt;a href="https://tuist.dev/en/docs/guides/features/cache" rel="noopener noreferrer"&gt;caching&lt;/a&gt;, &lt;a href="https://tuist.dev/en/docs/guides/features/selective-testing" rel="noopener noreferrer"&gt;selective testing&lt;/a&gt;, &lt;a href="https://tuist.dev/en/docs/guides/features/runners" rel="noopener noreferrer"&gt;runners&lt;/a&gt; to run the builds on, and now &lt;a href="https://github.com/tuist/once" rel="noopener noreferrer"&gt;Once&lt;/a&gt;, with remote execution coming next.&lt;/p&gt;

&lt;p&gt;Once native builds are fast too, iteration speed becomes a much weaker argument for a web runtime. The other reasons, like the ecosystem or hiring, may still apply to you, and I don't expect anyone to rewrite a large codebase because the economics moved. But it got us thinking about how we'd build a multi-platform app if we started one today, so we wrote down the principles we'd follow and built a small sample app to see whether they hold up.&lt;/p&gt;

&lt;p&gt;None of this is entirely new to us. Almost ten years ago we were exploring modular architectures for iOS apps and came up with microfeatures, which many teams adopted and which we later renamed &lt;a href="https://tuist.dev/en/docs/guides/features/projects/tma-architecture" rel="noopener noreferrer"&gt;The Modular Architecture&lt;/a&gt;. Tuist itself grew out of that work. This post takes the same ideas about boundaries and build graphs and stretches them across platforms.&lt;/p&gt;

&lt;p&gt;We call this set of principles &lt;strong&gt;native edges&lt;/strong&gt;. An app has two layers, and both ship inside it. The &lt;strong&gt;headless core&lt;/strong&gt; holds the business logic and has no UI at all, and the &lt;strong&gt;native edges&lt;/strong&gt; are what users see and touch, one per platform, each connecting the core to its platform. We stayed away from frontend and backend on purpose, because most people hear those words and think UI and server.&lt;/p&gt;

&lt;p&gt;The principles are:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;a href="https://tuist.dev/blog/2026/11/02/native-edges#1-keep-business-logic-in-a-headless-core" rel="noopener noreferrer"&gt;Keep business logic in a headless core&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://tuist.dev/blog/2026/11/02/native-edges#2-choose-a-core-language-that-runs-everywhere-you-ship" rel="noopener noreferrer"&gt;Choose a core language that runs everywhere you ship&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://tuist.dev/blog/2026/11/02/native-edges#3-connect-the-edges-to-the-core-through-a-small-typed-api" rel="noopener noreferrer"&gt;Connect the edges to the core through a small, typed API&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://tuist.dev/blog/2026/11/02/native-edges#4-make-every-screen-reachable-by-an-address" rel="noopener noreferrer"&gt;Make every screen reachable by an address&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://tuist.dev/blog/2026/11/02/native-edges#5-model-the-whole-app-in-one-build-graph" rel="noopener noreferrer"&gt;Model the whole app in one build graph&lt;/a&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;You don't have to take all of them. Some projects will have good reasons to keep a piece of logic in Swift, to share less, or to use different tools than we do, and that's fine.&lt;/p&gt;

&lt;h2&gt;
  
  
  The sample app
&lt;/h2&gt;

&lt;p&gt;To see whether the principles hold up end to end, we built &lt;a href="https://github.com/tuist/native-edges" rel="noopener noreferrer"&gt;Native Edges&lt;/a&gt;, a client-side agent. You sign in with your ChatGPT account and talk to an agent whose loop, tools, and conversation history live on your device, while the model runs in the cloud. There's an iOS app in SwiftUI, an Android app in Kotlin and Jetpack Compose, and a command-line tool in Rust, and all three sit on one headless core, also written in Rust. The core handles the device-code sign-in and token refresh, runs the agent loop and its requests to the model, provides the tools the agent uses to read earlier conversations, and stores the history in &lt;a href="https://www.sqlite.org" rel="noopener noreferrer"&gt;SQLite&lt;/a&gt; through &lt;a href="https://diesel.rs" rel="noopener noreferrer"&gt;Diesel&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Here's the iOS app, built and launched on a simulator with &lt;code&gt;once run&lt;/code&gt;. It signs in with a device code, lists the stored conversations, and asks the agent something that makes it go back to earlier ones. Then the CLI lists the app's routes and builds the URL for one conversation, and the simulator opens it:&lt;/p&gt;

&lt;p&gt;▶️ &lt;a href="https://tuist.dev/blog/2026/11/02/native-edges" rel="noopener noreferrer"&gt;Watch the demo on the original post&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We'll keep coming back to the sample throughout the post. Here are its three edges, plus two more that the same core could support but the sample doesn't include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Native edges:&lt;/strong&gt; iOS (SwiftUI + Swift), Android (Jetpack Compose + Kotlin), CLI (terminal), plus Linux and Windows (GPUI) and Web (HTML + JavaScript), which aren't in the sample.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Headless core in Rust:&lt;/strong&gt; route catalog and deep links, sign-in and sessions, agent loop and model API, conversation history.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Bridges:&lt;/strong&gt; iOS calls the core through UniFFI Swift bindings, Android through UniFFI Kotlin bindings + JNA, the CLI and desktop through plain Rust calls, and the web through WebAssembly.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;(&lt;a href="https://tuist.dev/blog/2026/11/02/native-edges" rel="noopener noreferrer"&gt;See the diagram on the original post&lt;/a&gt;)&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Keep business logic in a headless core
&lt;/h2&gt;

&lt;p&gt;The rule we follow is simple to say: put in the edge whatever only the platform can do, and put everything else in the core.&lt;/p&gt;

&lt;p&gt;The edge is the layer users touch. For apps, that means a UI written in a framework that compiles for the platform and follows its conventions, which today is SwiftUI on Apple platforms and Jetpack Compose on Android. Anything you can only reach through the platform's frameworks belongs there too: the &lt;a href="https://developer.apple.com/documentation/security/keychain-services" rel="noopener noreferrer"&gt;Keychain&lt;/a&gt; or the &lt;a href="https://developer.android.com/privacy-and-security/keystore" rel="noopener noreferrer"&gt;Android Keystore&lt;/a&gt;, presenting a browser for an &lt;a href="https://oauth.net/2/" rel="noopener noreferrer"&gt;OAuth&lt;/a&gt; flow, registering for &lt;a href="https://developer.apple.com/documentation/usernotifications" rel="noopener noreferrer"&gt;push notifications&lt;/a&gt;, &lt;a href="https://developer.apple.com/documentation/activitykit" rel="noopener noreferrer"&gt;Live Activities&lt;/a&gt;, &lt;a href="https://developer.apple.com/design/human-interface-guidelines/sharing-and-collaboration" rel="noopener noreferrer"&gt;share extensions&lt;/a&gt;, or on-device &lt;a href="https://developer.apple.com/documentation/speech" rel="noopener noreferrer"&gt;speech recognition&lt;/a&gt;. These are the details users notice when an app gets them wrong, so we'd rather each platform own them.&lt;/p&gt;

&lt;p&gt;A command-line tool is an edge too, one whose platform happens to be the terminal, and so is a web app, with the core compiled to &lt;a href="https://webassembly.org" rel="noopener noreferrer"&gt;WebAssembly&lt;/a&gt; and the browser as its platform.&lt;/p&gt;

&lt;p&gt;The core is the logic that's the same everywhere: which fields of a record can be edited, how a list is paginated, how an OAuth token is refreshed, how history is reconciled after a reconnect, or making sure a late response from a cancelled request doesn't overwrite newer results. Because the core has no UI and doesn't depend on any platform framework, you can cover most of the app's behavior with unit tests that run in seconds, without a simulator, an emulator, or UI automation, and those tests cover every platform at once. Each edge still needs some tests for rendering and platform integration, but far fewer than before.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://ghostty.org" rel="noopener noreferrer"&gt;Ghostty&lt;/a&gt;, the terminal emulator by &lt;a href="https://mitchellh.com" rel="noopener noreferrer"&gt;Mitchell Hashimoto&lt;/a&gt;, is one of my favorite examples of this split. Its core, &lt;a href="https://ghostty.org/docs/about#libghostty" rel="noopener noreferrer"&gt;libghostty&lt;/a&gt;, is written in Zig, exposes a C API, and handles terminal emulation, fonts, and rendering. On top of it sit a macOS app written in Swift with AppKit and SwiftUI and a Linux app that uses GTK. Ghostty's core does more than ours, since it includes rendering, but the idea is the same: one shared engine, and on each platform an app that feels like it belongs there.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Choose a core language that runs everywhere you ship
&lt;/h2&gt;

&lt;p&gt;Look for a language with good toolchains and a good standard library on every platform you support, so you don't find out halfway through a feature that the API you need doesn't exist on one of them. &lt;a href="https://www.rust-lang.org" rel="noopener noreferrer"&gt;Rust&lt;/a&gt; does well here. It compiles to iOS, Android, macOS, Linux, Windows, and WebAssembly, and its crates cover almost everything a client needs. The browser is a bit of a special case: the core runs there as WebAssembly, but on &lt;a href="https://doc.rust-lang.org/rustc/platform-support/wasm32-unknown-unknown.html" rel="noopener noreferrer"&gt;&lt;code&gt;wasm32-unknown-unknown&lt;/code&gt;&lt;/a&gt; parts of the standard library, like the file system and threads, don't work, so a web edge needs crates that go through the browser's APIs instead, like &lt;code&gt;fetch&lt;/code&gt; for networking or IndexedDB for storage. &lt;a href="https://ziglang.org" rel="noopener noreferrer"&gt;Zig&lt;/a&gt; is another good option, with explicit allocators and cross-compilation built into its toolchain, and &lt;a href="https://go.dev" rel="noopener noreferrer"&gt;Go&lt;/a&gt; can work too, although it brings a garbage collector with it.&lt;/p&gt;

&lt;p&gt;Memory is one of the main reasons we lean towards Rust and Zig. Neither has a garbage collector, so you decide when memory is allocated and freed, which matters in places with strict limits, like watches, embedded devices, or the app extensions and widgets the system kills when they use too much. It also means your app doesn't run a second garbage collector next to Swift's reference counting or the Android runtime's own collector. You still have to respect ownership rules at the boundary and measure memory on constrained targets, but you're the one in control.&lt;/p&gt;

&lt;p&gt;A question we get a lot is why we don't use &lt;a href="https://kotlinlang.org/docs/multiplatform.html" rel="noopener noreferrer"&gt;Kotlin Multiplatform&lt;/a&gt; on Apple platforms, or &lt;a href="https://www.swift.org/android-workgroup/" rel="noopener noreferrer"&gt;Swift on Android&lt;/a&gt;. Both work, and teams ship real apps with them. Our concern is that a language built for one platform brings its runtime and memory model along to the others, and its standard library and tooling tend to be most complete on the platform where it started. Rust and Zig don't have a home platform in that sense, and for a shared core that's what we want.&lt;/p&gt;

&lt;p&gt;I also think the choice of language will matter less and less. As models write more of the code, the questions that remain are whether the language fits the job and whether agents are good at writing and reasoning about it. Rust does well on both: its compiler is strict and its error messages are detailed, so when an agent gets something wrong, it finds out right away and knows why.&lt;/p&gt;

&lt;p&gt;If we picked a stack today, it would look like this:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Platform&lt;/th&gt;
&lt;th&gt;Native edge: UI&lt;/th&gt;
&lt;th&gt;Native edge: platform services&lt;/th&gt;
&lt;th&gt;Headless core&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;iOS, iPadOS, macOS&lt;/td&gt;
&lt;td&gt;SwiftUI&lt;/td&gt;
&lt;td&gt;&lt;a href="https://www.swift.org" rel="noopener noreferrer"&gt;Swift&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Rust&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Android&lt;/td&gt;
&lt;td&gt;Jetpack Compose&lt;/td&gt;
&lt;td&gt;&lt;a href="https://kotlinlang.org" rel="noopener noreferrer"&gt;Kotlin&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Rust&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Linux, Windows&lt;/td&gt;
&lt;td&gt;&lt;a href="https://www.gpui.rs" rel="noopener noreferrer"&gt;GPUI&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Rust&lt;/td&gt;
&lt;td&gt;Rust&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Command line&lt;/td&gt;
&lt;td&gt;Terminal&lt;/td&gt;
&lt;td&gt;Rust&lt;/td&gt;
&lt;td&gt;Rust&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Web&lt;/td&gt;
&lt;td&gt;HTML and JavaScript&lt;/td&gt;
&lt;td&gt;Browser APIs&lt;/td&gt;
&lt;td&gt;Rust compiled to WebAssembly&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;For desktop outside macOS, we'd go with &lt;a href="https://www.gpui.rs" rel="noopener noreferrer"&gt;GPUI&lt;/a&gt;, the UI framework the &lt;a href="https://zed.dev" rel="noopener noreferrer"&gt;Zed&lt;/a&gt; team built for their editor. GPUI draws its own UI on the GPU instead of using the operating system's toolkit, compiles to a native binary, and integrates with each platform, and there are component libraries for it, like &lt;a href="https://github.com/longbridge/gpui-component" rel="noopener noreferrer"&gt;GPUI Component&lt;/a&gt;, for building desktop apps in the spirit of Zed. Since GPUI is Rust too, on Linux and Windows the edge and the core share a language and need no bridge at all.&lt;/p&gt;

&lt;p&gt;The command line is in the table because the terminal is a platform too, and developers can tell right away when a CLI starts fast, follows the terminal's conventions, and plays well with pipes and scripts. With a headless core, a CLI is a thin edge over logic you already have, so building one in Rust is cheap. Agents use a lot of software through CLIs, and I expect this edge to matter more and more as they do.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Connect the edges to the core through a small, typed API
&lt;/h2&gt;

&lt;p&gt;The sample uses &lt;a href="https://github.com/mozilla/uniffi-rs" rel="noopener noreferrer"&gt;UniFFI&lt;/a&gt;, a tool from Mozilla that generates Swift and Kotlin bindings from annotations in the Rust code. The core marks what it exports, and the edges call typed functions and get typed values back, with no C headers or JSON in between:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight rust"&gt;&lt;code&gt;&lt;span class="nd"&gt;#[derive(uniffi::Record)]&lt;/span&gt;
&lt;span class="k"&gt;pub&lt;/span&gt; &lt;span class="k"&gt;struct&lt;/span&gt; &lt;span class="n"&gt;Destination&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;pub&lt;/span&gt; &lt;span class="n"&gt;route&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;String&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="k"&gt;pub&lt;/span&gt; &lt;span class="n"&gt;params&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;Params&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="k"&gt;pub&lt;/span&gt; &lt;span class="n"&gt;url&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;String&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nd"&gt;#[derive(Debug,&lt;/span&gt; &lt;span class="nd"&gt;uniffi::Error)]&lt;/span&gt;
&lt;span class="nd"&gt;#[uniffi(flat_error)]&lt;/span&gt;
&lt;span class="k"&gt;pub&lt;/span&gt; &lt;span class="k"&gt;enum&lt;/span&gt; &lt;span class="n"&gt;CoreError&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="cd"&gt;/// No session, or it expired: show the sign-in screen.&lt;/span&gt;
    &lt;span class="n"&gt;Unauthorized&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;message&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;String&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="n"&gt;Failed&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;kind&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;String&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;message&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;String&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="cd"&gt;/// Resolves a deep link into its destination and parents.&lt;/span&gt;
&lt;span class="nd"&gt;#[uniffi::export]&lt;/span&gt;
&lt;span class="k"&gt;pub&lt;/span&gt; &lt;span class="k"&gt;fn&lt;/span&gt; &lt;span class="nf"&gt;open&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;url&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;String&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;Result&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nb"&gt;Vec&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;Destination&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;CoreError&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;// ...&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="cd"&gt;/// Sends a message and waits for the agent's answer.&lt;/span&gt;
&lt;span class="nd"&gt;#[uniffi::export]&lt;/span&gt;
&lt;span class="k"&gt;pub&lt;/span&gt; &lt;span class="k"&gt;fn&lt;/span&gt; &lt;span class="nf"&gt;send&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;Option&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nb"&gt;String&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;text&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;String&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;Result&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;Conversation&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;CoreError&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;// ...&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In Swift, these are ordinary functions, and the Rust error becomes a Swift error you can catch. &lt;code&gt;send&lt;/code&gt; blocks while the agent works, so the sample runs it off the main actor with a small &lt;code&gt;background&lt;/code&gt; helper of its own:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight swift"&gt;&lt;code&gt;&lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="nv"&gt;stack&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;try&lt;/span&gt; &lt;span class="kt"&gt;EdgesCore&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;open&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;url&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;link&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="nv"&gt;reply&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;try&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;background&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;try&lt;/span&gt; &lt;span class="kt"&gt;EdgesCore&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;send&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;text&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;text&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Kotlin gets the same API, with &lt;code&gt;CoreException.Unauthorized&lt;/code&gt; in place of the Swift error case, and the CLI calls the Rust functions directly. Adding a capability means exporting a function in Rust, and the apps get it with compiler-checked types. The core returns plain values, like a conversation and the URLs it links to, and leaves it to each edge to decide how to present them: a pushed view on iOS, a back-stack entry on Android, or printed output in the terminal.&lt;/p&gt;

&lt;p&gt;Sometimes the core needs something only the platform provides, so the API has to work in the other direction too. A token refresh rotates the session, and the new session has to land in the Keychain on iOS and in Keystore-backed encrypted storage on Android. For that we use the delegate pattern: the core declares what it needs as an interface, and each edge provides an implementation. In UniFFI, that's a Rust trait marked &lt;code&gt;with_foreign&lt;/code&gt;, which Swift and Kotlin can implement:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight rust"&gt;&lt;code&gt;&lt;span class="cd"&gt;/// Provided by the edge: the Keychain on iOS, the Keystore&lt;/span&gt;
&lt;span class="cd"&gt;/// on Android, and a private file in the terminal.&lt;/span&gt;
&lt;span class="nd"&gt;#[uniffi::export(with_foreign)]&lt;/span&gt;
&lt;span class="k"&gt;pub&lt;/span&gt; &lt;span class="k"&gt;trait&lt;/span&gt; &lt;span class="n"&gt;SecureStorage&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;Send&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nb"&gt;Sync&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;fn&lt;/span&gt; &lt;span class="nf"&gt;read&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="k"&gt;self&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;key&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;String&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;Option&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nb"&gt;String&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;fn&lt;/span&gt; &lt;span class="nf"&gt;write&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="k"&gt;self&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;key&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;String&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;value&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;String&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="k"&gt;fn&lt;/span&gt; &lt;span class="nf"&gt;delete&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="k"&gt;self&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;key&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;String&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;On iOS, the implementation is a small class over the Keychain, and the app hands it to the core at launch, along with a directory where the core keeps its SQLite database:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight swift"&gt;&lt;code&gt;&lt;span class="kd"&gt;final&lt;/span&gt; &lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="kt"&gt;Keychain&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;SecureStorage&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;func&lt;/span&gt; &lt;span class="nf"&gt;read&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;key&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;String&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="kt"&gt;String&lt;/span&gt;&lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="cm"&gt;/* SecItemCopyMatching */&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="kd"&gt;func&lt;/span&gt; &lt;span class="nf"&gt;write&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;key&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;String&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;value&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;String&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="cm"&gt;/* SecItemAdd */&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="kd"&gt;func&lt;/span&gt; &lt;span class="nf"&gt;delete&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;key&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;String&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="cm"&gt;/* SecItemDelete */&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="nv"&gt;directory&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kt"&gt;URL&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;applicationSupportDirectory&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;path&lt;/span&gt;
&lt;span class="n"&gt;_&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;try&lt;/span&gt; &lt;span class="nf"&gt;launch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;dataDir&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;directory&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;storage&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;Keychain&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Android passes a &lt;code&gt;Keystore&lt;/code&gt; class that encrypts the value with an Android Keystore key, and the CLI passes one that writes files only you can read. The split of responsibilities is what we like here: the core decides what to store and when, such as a renewed session after a refresh, and the edge decides how the operating system protects it. The core's tests pass an in-memory implementation, so they don't need a Keychain or a simulator. We kept the trait simple for the sample, but in a production app &lt;code&gt;write&lt;/code&gt; and &lt;code&gt;delete&lt;/code&gt; should report failures so the core can handle them.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Make every screen reachable by an address
&lt;/h2&gt;

&lt;p&gt;Core tests cover the shared rules, but sometimes you want to test how an edge and the core work together, like whether a screen renders the data the core returns or whether a tap triggers the right call. Whether you or an agent runs that test, you want to get to the screen in one step, not ten.&lt;/p&gt;

&lt;p&gt;A CLI makes this easy, because every operation is a named command with options and arguments you can find in the code and run. Web apps are close, since every page has a URL that an agent can read from the route definitions and open. Mobile and desktop apps usually have neither, so getting to a screen means launching the app and tapping through every step in between, which is slow and breaks every time the UI changes. We think native apps deserve a &lt;strong&gt;declarative navigation system&lt;/strong&gt; that does two things:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Makes routes discoverable.&lt;/strong&gt; The app declares destinations as data, like an enum or a list of types, so someone reading the code, or an agent, can find every place the app can go.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Lets you open any route directly.&lt;/strong&gt; A single entry point takes a route, usually as a URL, and builds the navigation state for it, so you can jump straight to a specific screen or record.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Navigation itself belongs to the platform. Each one has strong conventions for stacks, tabs, sheets, transitions, and Back behavior, and users expect them. What the core can own is the route catalog and URL parsing, so every edge agrees on which destinations exist and what a link means. In the sample, each route has an identifier, a URL pattern, and a parent, so a deep link opens on top of the screens you'd normally pass through, and Back works as if you had tapped your way there:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight rust"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Simplified from core/src/routes.rs.&lt;/span&gt;
&lt;span class="k"&gt;pub&lt;/span&gt; &lt;span class="k"&gt;static&lt;/span&gt; &lt;span class="n"&gt;ROUTES&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;Route&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;
    &lt;span class="n"&gt;Route&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;"conversations"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;path&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;"conversations"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;parent&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;None&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="n"&gt;Route&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;"new"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;path&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;"conversations/new"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;parent&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;Some&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"conversations"&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="n"&gt;Route&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;"conversation"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;path&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;"conversations/{id}"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;parent&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;Some&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"conversations"&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="p"&gt;];&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Every edge asks the core what a URL means, and tapping a row opens that row's URL, so taps and deep links go through the same code. That's what makes this useful for agents: one can list the routes with the CLI and then open a specific conversation on a simulator or an emulator with a single command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;edges routes
xcrun simctl openurl booted edges://conversations/011d032b115d6baa
adb shell am start &lt;span class="nt"&gt;-a&lt;/span&gt; android.intent.action.VIEW &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-d&lt;/span&gt; edges://conversations/011d032b115d6baa
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In the sample, each edge keeps its own database, so a link only opens a conversation that exists in that app. The same URLs can also arrive from notifications and shared links, so treat them as untrusted input: opening a route picks a screen, and the core and the server still check what the user can see.&lt;/p&gt;

&lt;p&gt;Each platform already has tools for the edge side:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;iOS and macOS:&lt;/strong&gt; model destinations as a &lt;code&gt;Codable&lt;/code&gt; enum and drive a &lt;a href="https://developer.apple.com/documentation/swiftui/navigationstack" rel="noopener noreferrer"&gt;&lt;code&gt;NavigationStack&lt;/code&gt;&lt;/a&gt; from a &lt;a href="https://developer.apple.com/documentation/swiftui/navigationpath" rel="noopener noreferrer"&gt;&lt;code&gt;NavigationPath&lt;/code&gt;&lt;/a&gt;, then turn incoming URLs into that path in &lt;a href="https://developer.apple.com/documentation/swiftui/view/onopenurl(perform:)" rel="noopener noreferrer"&gt;&lt;code&gt;onOpenURL&lt;/code&gt;&lt;/a&gt;. Point-Free's &lt;a href="https://github.com/pointfreeco/swift-navigation" rel="noopener noreferrer"&gt;swift-navigation&lt;/a&gt; models every destination, including sheets and alerts, as state, so opening a screen means constructing a value. On macOS, &lt;code&gt;open &amp;lt;url&amp;gt;&lt;/code&gt; does what &lt;code&gt;simctl openurl&lt;/code&gt; does on a simulator.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Android:&lt;/strong&gt; &lt;a href="https://developer.android.com/develop/ui/compose/navigation" rel="noopener noreferrer"&gt;Navigation Compose&lt;/a&gt; supports type-safe routes declared as &lt;code&gt;@Serializable&lt;/code&gt; classes, with deep links mapped to them. In &lt;a href="https://developer.android.com/guide/navigation/navigation-3" rel="noopener noreferrer"&gt;Navigation 3&lt;/a&gt;, the back stack is a list of keys that you own, and deep link matchers turn a URL into the initial back stack.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Desktop with GPUI:&lt;/strong&gt; GPUI declares actions with names and dispatches them by name, which is how Zed's command palette lists everything the editor can do. Routes can follow the same pattern, with a command-line flag like &lt;code&gt;--open &amp;lt;route&amp;gt;&lt;/code&gt; as the entry point.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  5. Model the whole app in one build graph
&lt;/h2&gt;

&lt;p&gt;You can build all of this with the tools you already have, but we'd recommend &lt;strong&gt;a build system that can model the entire graph&lt;/strong&gt;: the Rust core compiled for each platform, the Swift and Kotlin bindings generated from it, the apps that link them, and the tests for each of them.&lt;/p&gt;

&lt;p&gt;Xcode and Gradle work well inside their own ecosystems, and they treat everything outside as foreign. Rust usually gets in as a script phase or a custom task that runs &lt;a href="https://doc.rust-lang.org/cargo/" rel="noopener noreferrer"&gt;Cargo&lt;/a&gt;, or as a prebuilt binary checked into the repository, and the outer build system sees one opaque step. Gradle can cache a custom task if you declare every input and output, but neither tool can schedule or cache the individual crates inside it, so the Rust side ends up rebuilding more than it should.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://bazel.build" rel="noopener noreferrer"&gt;Bazel&lt;/a&gt; and &lt;a href="https://buck2.build" rel="noopener noreferrer"&gt;Buck2&lt;/a&gt; can model all of this, which is why many teams use them. They also ask you to learn their rules and configure toolchains, and a lot of teams find the developer experience hard to live with. For the sample we used &lt;a href="https://github.com/tuist/once" rel="noopener noreferrer"&gt;Once&lt;/a&gt;, the build system we're building at Tuist, which models the same kind of typed graph with remote caching and keeps the configuration in a single TOML file. It's early and still in canary, so expect rough edges. Here's an excerpt of the sample's &lt;a href="https://github.com/tuist/native-edges/blob/main/once.toml" rel="noopener noreferrer"&gt;&lt;code&gt;once.toml&lt;/code&gt;&lt;/a&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight toml"&gt;&lt;code&gt;&lt;span class="c"&gt;# The headless core, built once per edge.&lt;/span&gt;
&lt;span class="k"&gt;[[&lt;/span&gt;&lt;span class="n"&gt;target&lt;/span&gt;&lt;span class="k"&gt;]]&lt;/span&gt;
&lt;span class="n"&gt;name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;"CoreIOS"&lt;/span&gt;
&lt;span class="n"&gt;kind&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;"rust_library"&lt;/span&gt;
&lt;span class="n"&gt;srcs&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s"&gt;"core/src/**/*.rs"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="n"&gt;deps&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s"&gt;"./CoreIOSDependencies"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;

&lt;span class="k"&gt;[&lt;/span&gt;&lt;span class="n"&gt;target&lt;/span&gt;&lt;span class="k"&gt;.&lt;/span&gt;&lt;span class="n"&gt;attrs&lt;/span&gt;&lt;span class="k"&gt;]&lt;/span&gt;
&lt;span class="n"&gt;crate_name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;"edges_core"&lt;/span&gt;
&lt;span class="n"&gt;crate_root&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;"core/src/lib.rs"&lt;/span&gt;
&lt;span class="n"&gt;target&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;"aarch64-apple-ios-sim"&lt;/span&gt;
&lt;span class="n"&gt;crate_type&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;"staticlib"&lt;/span&gt;

&lt;span class="c"&gt;# The terminal edge.&lt;/span&gt;
&lt;span class="k"&gt;[[&lt;/span&gt;&lt;span class="n"&gt;target&lt;/span&gt;&lt;span class="k"&gt;]]&lt;/span&gt;
&lt;span class="n"&gt;name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;"CLI"&lt;/span&gt;
&lt;span class="n"&gt;kind&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;"rust_binary"&lt;/span&gt;
&lt;span class="n"&gt;srcs&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s"&gt;"cli/src/**/*.rs"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="n"&gt;deps&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s"&gt;"./Core"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"./CoreDependencies"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;

&lt;span class="c"&gt;# The SwiftUI edge, and the Swift bindings it calls.&lt;/span&gt;
&lt;span class="k"&gt;[[&lt;/span&gt;&lt;span class="n"&gt;target&lt;/span&gt;&lt;span class="k"&gt;]]&lt;/span&gt;
&lt;span class="n"&gt;name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;"SwiftBindings"&lt;/span&gt;
&lt;span class="n"&gt;kind&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;"uniffi_bindings"&lt;/span&gt;
&lt;span class="n"&gt;deps&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s"&gt;"bindgen/Bindgen"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"./CoreIOS"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;

&lt;span class="k"&gt;[&lt;/span&gt;&lt;span class="n"&gt;target&lt;/span&gt;&lt;span class="k"&gt;.&lt;/span&gt;&lt;span class="n"&gt;attrs&lt;/span&gt;&lt;span class="k"&gt;]&lt;/span&gt;
&lt;span class="n"&gt;language&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;"swift"&lt;/span&gt;

&lt;span class="k"&gt;[[&lt;/span&gt;&lt;span class="n"&gt;target&lt;/span&gt;&lt;span class="k"&gt;]]&lt;/span&gt;
&lt;span class="n"&gt;name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;"IOS"&lt;/span&gt;
&lt;span class="n"&gt;kind&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;"apple_application"&lt;/span&gt;
&lt;span class="n"&gt;srcs&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s"&gt;"ios/Sources/**/*.swift"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="n"&gt;deps&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s"&gt;"./CoreIOS"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"./SwiftBindings"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"./SimulatorSDK"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;

&lt;span class="k"&gt;[&lt;/span&gt;&lt;span class="n"&gt;target&lt;/span&gt;&lt;span class="k"&gt;.&lt;/span&gt;&lt;span class="n"&gt;attrs&lt;/span&gt;&lt;span class="k"&gt;]&lt;/span&gt;
&lt;span class="n"&gt;platform&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;"ios"&lt;/span&gt;
&lt;span class="n"&gt;bundle_id&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;"dev.tuist.edges"&lt;/span&gt;
&lt;span class="n"&gt;sdk_frameworks&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s"&gt;"Security"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;

&lt;span class="c"&gt;# The Jetpack Compose edge.&lt;/span&gt;
&lt;span class="k"&gt;[[&lt;/span&gt;&lt;span class="n"&gt;target&lt;/span&gt;&lt;span class="k"&gt;]]&lt;/span&gt;
&lt;span class="n"&gt;name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;"Android"&lt;/span&gt;
&lt;span class="n"&gt;kind&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;"android_binary"&lt;/span&gt;
&lt;span class="n"&gt;srcs&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s"&gt;"android/src/**/*.kt"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="n"&gt;deps&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s"&gt;"./CoreAndroid"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"./KotlinBindings"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"./Compose"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;

&lt;span class="k"&gt;[&lt;/span&gt;&lt;span class="n"&gt;target&lt;/span&gt;&lt;span class="k"&gt;.&lt;/span&gt;&lt;span class="n"&gt;attrs&lt;/span&gt;&lt;span class="k"&gt;]&lt;/span&gt;
&lt;span class="n"&gt;application_id&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;"dev.tuist.edges"&lt;/span&gt;
&lt;span class="n"&gt;min_sdk_version&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;26&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Rust libraries, Apple applications, Android binaries, the bindings between them, and their tests all live in the same graph. Once resolves third-party crates from &lt;code&gt;Cargo.lock&lt;/code&gt; into per-platform dependency targets, so each crate compiles separately with its own cache key, instead of one &lt;code&gt;cargo build&lt;/code&gt; compiling everything at once.&lt;/p&gt;

&lt;p&gt;The graph generates the bindings too, so nobody has to check them into the repository. Once doesn't have a built-in rule for UniFFI yet, so the sample adds one in a small &lt;a href="https://github.com/tuist/native-edges/blob/main/modules/uniffi.star" rel="noopener noreferrer"&gt;Starlark module&lt;/a&gt; that builds &lt;code&gt;uniffi-bindgen&lt;/code&gt; from source, runs it against the compiled core, and compiles the generated code into a Swift module for iOS and a Kotlin library for Android. Once caches that step like any other, keyed on the generator, its configuration, and the compiled core.&lt;/p&gt;

&lt;p&gt;This graph is also what caching relies on. Each step gets a key computed from its inputs, so a change to a SwiftUI view doesn't recompile the Rust core, and you can share the results between your machine, your teammates', CI, and agents working in other worktrees. When the work a build does grows with the size of your change and not the size of your app, native iteration starts to feel close to the hot reloading that made web runtimes so attractive. Linking, installing, and launching still take time, but you stop paying for a full rebuild on top.&lt;/p&gt;

&lt;h3&gt;
  
  
  Keep the graph fast
&lt;/h3&gt;

&lt;p&gt;The shape of the graph matters as much as the build system. A build can only run in parallel what the graph lets it run in parallel, and Apple's &lt;a href="https://developer.apple.com/videos/play/wwdc2022/110364/" rel="noopener noreferrer"&gt;WWDC talk on build parallelization&lt;/a&gt; calls the longest chain of dependencies the critical path: no extra cores or remote workers make the build shorter than that. So we keep the graph shallow and wide. We only add a dependency when we need it, put interfaces in their own modules so implementations compile side by side (Bruno Rocha explains the technique in &lt;a href="https://swiftrocks.com/reducing-ios-build-times-by-using-interface-targets" rel="noopener noreferrer"&gt;Reducing iOS Build Times by using Interface Modules&lt;/a&gt;), and keep shared foundations small, because everything downstream rebuilds when they change. Spotify's account of &lt;a href="https://engineering.atspotify.com/2023/10/switching-build-systems-seamlessly" rel="noopener noreferrer"&gt;moving its iOS app to Bazel&lt;/a&gt; shows what that buys you: with remote caching and the module isolation they did during the migration, their CI feedback loop went from 80 minutes to 20.&lt;/p&gt;

&lt;p&gt;The same goes for deciding what each edge includes. A widget doesn't need the agent, and a web build pays for every kilobyte it ships, but if each edge builds the core with its own &lt;a href="https://doc.rust-lang.org/cargo/reference/features.html" rel="noopener noreferrer"&gt;Cargo features&lt;/a&gt;, the cache sees a different core per edge, and you end up building and keeping warm one graph per edge. Bazel's documentation on &lt;a href="https://bazel.build/extending/config#memory-performance-considerations" rel="noopener noreferrer"&gt;configurations&lt;/a&gt; warns about the same growth. We'd rather split the core into crates, like storage, networking, and the agent, and let each edge depend on the ones it needs, the way Mozilla's &lt;a href="https://mozilla.github.io/application-services/book/design/megazords.html" rel="noopener noreferrer"&gt;megazords&lt;/a&gt; link only the components an app uses. A crate's hash doesn't depend on who uses it, so adding or removing an edge doesn't invalidate anything shared. For dropping unused code from a binary, the linker's dead-code stripping does the job after the core is compiled and cached.&lt;/p&gt;

&lt;p&gt;Try both approaches below. Each edge links the crates it picks through a small umbrella crate, drawn dashed. Turn edges on and off or edit a file in storage, and watch which nodes get a new hash:&lt;/p&gt;

&lt;p&gt;🧪 &lt;a href="https://tuist.dev/blog/2026/11/02/native-edges" rel="noopener noreferrer"&gt;Try the interactive graph on the original post&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The sample's graph is small, but it has this shape: each edge depends only on its build of the core and its own platform libraries, and no edge depends on another.&lt;/p&gt;

&lt;h2&gt;
  
  
  Adopting native edges
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Starting with one platform
&lt;/h3&gt;

&lt;p&gt;We like to start with one platform and move logic into the core as soon as it looks reusable, without trying to design the core up front. A few signs that something belongs there: it doesn't import any platform framework, another platform would need the same behavior, or you'd want to test it without launching the app. Some typical candidates:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The API client: routes, request and response types, validation, and error mapping.&lt;/li&gt;
&lt;li&gt;Authentication: building the sign-in URL, exchanging codes for tokens, and refreshing them.&lt;/li&gt;
&lt;li&gt;Pagination, search, and filtering rules for lists.&lt;/li&gt;
&lt;li&gt;Form validation, like which fields are required and what a valid date range looks like.&lt;/li&gt;
&lt;li&gt;The route catalog and deep-link parsing.&lt;/li&gt;
&lt;li&gt;Local caching and reconciling data after a reconnect.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;When the second platform comes along, most of the work is building a new edge on top of a core that's already built and tested. And keep doing it as features change: when a Swift or Kotlin model starts making business decisions, that's your cue to move the logic into the core.&lt;/p&gt;

&lt;h3&gt;
  
  
  If you already have clients
&lt;/h3&gt;

&lt;p&gt;Most teams won't start from scratch, and that's the more interesting case. If you already have clients on several platforms, each in its own language and built with its own tools, I'd start by modeling them in one build graph connected to a remote cache. That makes builds faster before any code moves, and it makes adding a Rust core affordable later. Then pick one piece that's duplicated across your clients, like the API client, authentication, or validation rules, and move it into the core, and while you're at it, think about what your app would look like as a CLI or a set of commands an agent can run. You keep shipping your clients the whole time, and over time you'll notice the edges getting thinner and thinner until they're mostly UI and calls to platform APIs.&lt;/p&gt;

&lt;h2&gt;
  
  
  What we're doing at Tuist
&lt;/h2&gt;

&lt;p&gt;We're doing this ourselves. The native clients of &lt;a href="https://tuist.dev/blog/2026/09/23/atlas-what-we-built-next" rel="noopener noreferrer"&gt;Atlas&lt;/a&gt;, our internal operations platform, follow these principles: an iOS and macOS app in SwiftUI, an Android app in Kotlin, and a CLI, all on one Rust core. We've also started moving Tuist's own clients to the same model. When we looked across them, we found a lot of duplicated logic, most of it in Swift and some of it rewritten in Kotlin and other languages, and we're now moving that layer into a shared Rust core with the CLI and the apps as its edges. We'll write about it as the work progresses.&lt;/p&gt;

&lt;p&gt;It would be a dream for us to see more apps built natively again, apps that use less memory, feel at home on their platform, and run faster. This is early work, and we kept the sample small on purpose. The &lt;a href="https://github.com/tuist/native-edges" rel="noopener noreferrer"&gt;sample app&lt;/a&gt; and &lt;a href="https://github.com/tuist/once" rel="noopener noreferrer"&gt;Once&lt;/a&gt; are on GitHub if you want to try the principles, and if you build something with them, we'd love to hear about it.&lt;/p&gt;

</description>
      <category>ios</category>
      <category>android</category>
      <category>rust</category>
      <category>architecture</category>
    </item>
    <item>
      <title>Bringing Tuist to Elixir</title>
      <dc:creator>Pedro Piñera Buendía</dc:creator>
      <pubDate>Sat, 31 Oct 2026 21:45:28 +0000</pubDate>
      <link>https://dev.to/tuist/bringing-tuist-to-elixir-1oe7</link>
      <guid>https://dev.to/tuist/bringing-tuist-to-elixir-1oe7</guid>
      <description>&lt;p&gt;We are very fond of &lt;a href="https://elixir-lang.org/" rel="noopener noreferrer"&gt;Elixir&lt;/a&gt;. An idea in &lt;a href="https://erlang.org/download/armstrong_thesis_2003.pdf" rel="noopener noreferrer"&gt;Joe Armstrong's thesis&lt;/a&gt; helped convince us to build &lt;a href="https://tuist.dev/" rel="noopener noreferrer"&gt;Tuist&lt;/a&gt;'s server with it: model software after the real world, as concurrent processes that communicate with each other. To us, software becomes easier to understand and maintain when its structure follows the world it's modelling.&lt;/p&gt;

&lt;p&gt;Since then, we've built much of Tuist in Elixir. &lt;a href="https://www.phoenixframework.org/" rel="noopener noreferrer"&gt;Phoenix&lt;/a&gt; lets us build dynamic experiences and test the UI in the same language, without maintaining a separate single-page application. Hot code reloading makes it easy to iterate. We're a small team, and being able to do all of that in Elixir has mattered a lot. &lt;a href="https://github.com/josevalim" rel="noopener noreferrer"&gt;José Valim&lt;/a&gt; has also been very supportive along the way.&lt;/p&gt;

&lt;p&gt;It's funny that, with agents, we're starting to appreciate many of &lt;a href="https://www.erlang.org/" rel="noopener noreferrer"&gt;Erlang&lt;/a&gt;'s primitives again. An agent might need to keep working for hours, communicate with other agents, and recover from failures. Processes, message passing, and supervision give us a lot to work with. We still need to persist state if we want to recover it after a restart; a supervisor doesn't do that for us. But we don't have to build the whole model ourselves.&lt;/p&gt;

&lt;p&gt;And we can look into the runtime while it's running. Which processes are consuming memory? Where is the CPU time going? Those questions become important when something works for much longer than a web request, and agents can use the same interfaces to investigate. The more we use Elixir, the more convinced we are that we chose well.&lt;/p&gt;

&lt;h2&gt;
  
  
  Bringing Tuist to more build systems
&lt;/h2&gt;

&lt;p&gt;That appreciation for Elixir is part of why we're announcing support for it today. The other part has to do with what we're building at Tuist.&lt;/p&gt;

&lt;p&gt;We started with builds and tests: understanding where the time goes, avoiding repeated compilation, and getting test results sooner. We already do that for &lt;a href="https://developer.apple.com/xcode/" rel="noopener noreferrer"&gt;Xcode&lt;/a&gt;, &lt;a href="https://gradle.org/" rel="noopener noreferrer"&gt;Gradle&lt;/a&gt;, and &lt;a href="https://bazel.build/" rel="noopener noreferrer"&gt;Bazel&lt;/a&gt;. Our principle is to bring that work to more toolchains, so teams can benefit from it where they already are.&lt;/p&gt;

&lt;p&gt;Of course, the toolchains don't all have the same capabilities. &lt;a href="https://hexdocs.pm/mix/Mix.html" rel="noopener noreferrer"&gt;Mix&lt;/a&gt; doesn't come with shared compilation caching or remote execution out of the box. Language design decisions also affect what we can offer. But what if we work with those ecosystems to help make more of it possible, including contributing to the toolchains themselves?&lt;/p&gt;

&lt;p&gt;We see ideas moving between build systems already. Working across them lets us participate in that: learn how one solves a problem, then explore whether the same idea makes sense elsewhere. It won't always, and we need to be honest about the limitations. But with agents producing more code to compile and test, we think there's a growing incentive to do that work.&lt;/p&gt;

&lt;p&gt;We're also betting that models will keep getting better at working with each toolchain. They still need infrastructure to query build and test data, reuse compiled work, and distribute execution. That's the part we're building.&lt;/p&gt;

&lt;p&gt;So when we asked ourselves which ecosystem to support next, Elixir felt obvious. We understand it, we use it every day, and we can dogfood the integration on Tuist itself. We also think it deserves more attention when it comes to build and test infrastructure. We'd like to help give it that attention.&lt;/p&gt;

&lt;p&gt;When we see teams like &lt;a href="https://remote.com/blog/partnerships/welcoming-elixir-creator-jose-valim" rel="noopener noreferrer"&gt;Remote&lt;/a&gt;, &lt;a href="https://discord.com/blog/tracing-discords-elixir-systems-without-melting-everything" rel="noopener noreferrer"&gt;Discord&lt;/a&gt;, &lt;a href="https://supabase.com/docs/guides/realtime/architecture" rel="noopener noreferrer"&gt;Supabase's Realtime team&lt;/a&gt;, or &lt;a href="https://jobs.apple.com/en-us/details/200604960/sr-software-engineer-elixir-environmental-systems?team=SFTWR" rel="noopener noreferrer"&gt;Apple's Environmental Systems team&lt;/a&gt; betting on Elixir, we want them to have build and test tooling that grows with their projects. And there's &lt;a href="https://www.erlang-solutions.com/blog/20-years-of-open-source-erlang-openerlang-interview-with-anton-lavrik-from-whatsapp/" rel="noopener noreferrer"&gt;WhatsApp&lt;/a&gt;, which built its messaging backend with &lt;a href="https://www.erlang.org/" rel="noopener noreferrer"&gt;Erlang&lt;/a&gt;, sharing the same runtime as Elixir. We get so much from this ecosystem. Helping organizations move faster with it feels like a good way to contribute.&lt;/p&gt;

&lt;p&gt;Here's what we've built so far. If you'd rather watch, we've recorded a walkthrough on &lt;a href="https://www.youtube.com/watch?v=rTxXBc0Fegc" rel="noopener noreferrer"&gt;YouTube&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/rTxXBc0Fegc" width="710" height="399"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  Getting started with Tuist and Mix
&lt;/h2&gt;

&lt;p&gt;Before going into the features, &lt;a href="https://tuist.dev/users/register" rel="noopener noreferrer"&gt;sign in or create an account&lt;/a&gt;, then create a project in the dashboard and choose &lt;strong&gt;Mix (Elixir)&lt;/strong&gt; as its build system. Its handle, &lt;code&gt;account/project&lt;/code&gt;, connects your local Mix project to the one on Tuist.&lt;/p&gt;

&lt;p&gt;Add our &lt;a href="https://hex.pm/packages/tuist_ex" rel="noopener noreferrer"&gt;Hex package&lt;/a&gt; to your existing dependencies in &lt;code&gt;mix.exs&lt;/code&gt;. You'll need Elixir 1.18 or later, but you don't need the &lt;a href="https://tuist.dev/en/docs/guides/install-tuist" rel="noopener noreferrer"&gt;Tuist CLI&lt;/a&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight elixir"&gt;&lt;code&gt;&lt;span class="k"&gt;defp&lt;/span&gt; &lt;span class="n"&gt;deps&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt;
  &lt;span class="p"&gt;[&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="ss"&gt;:tuist_ex&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"~&amp;gt; 0.10.0"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;runtime:&lt;/span&gt; &lt;span class="no"&gt;false&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="k"&gt;end&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then fetch it, configure it with your project handle, and log in:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;mix deps.get
mix tuist.setup &lt;span class="nt"&gt;--project&lt;/span&gt; account/project
mix tuist.login
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Setup updates &lt;code&gt;mix.exs&lt;/code&gt; with the project configuration, enables dependency caching, and installs the compile and test aliases. Login opens your browser to authenticate. Commit the configuration, and keep using &lt;code&gt;mix compile&lt;/code&gt; and &lt;code&gt;mix test&lt;/code&gt; as usual. The &lt;a href="https://tuist.dev/en/docs/guides/get-started/elixir-project" rel="noopener noreferrer"&gt;Elixir guide&lt;/a&gt; covers the details.&lt;/p&gt;

&lt;p&gt;In CI, use a token or authenticate through &lt;a href="https://openid.net/developers/how-connect-works/" rel="noopener noreferrer"&gt;OpenID Connect (OIDC)&lt;/a&gt; with a supported provider; the &lt;a href="https://tuist.dev/en/docs/guides/install-hex-package#authenticate" rel="noopener noreferrer"&gt;authentication guide&lt;/a&gt; walks you through both options.&lt;/p&gt;

&lt;h2&gt;
  
  
  Build insights for Elixir
&lt;/h2&gt;

&lt;p&gt;It's easy to look at a slow build and think we need a bigger machine. But if most files are waiting for a handful of modules to compile, more cores won't help much. We need to understand why those dependencies exist.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://hexdocs.pm/gettext/Gettext.html" rel="noopener noreferrer"&gt;Gettext&lt;/a&gt; is a good example. Before &lt;a href="https://github.com/elixir-gettext/gettext/blob/v0.26.0/CHANGELOG.md" rel="noopener noreferrer"&gt;version 0.26&lt;/a&gt;, importing an application's Gettext backend to use its macros created a compile-time dependency on that backend. Many views and controllers could end up waiting for the same module, and changing a translation could trigger recompilation across much of the application. Separating the macros from the generated backend removed those dependencies. That improvement didn't require a bigger machine.&lt;/p&gt;

&lt;p&gt;But to find a problem like that in your own project, you need to see more than the build's total duration. Tuist records which files compiled, the modules they define and depend on, and how much time they spent compiling or waiting. You can sort files by compilation time or by how many other files depend on them. A slow file that the rest of the application waits for is worth investigating before one that compiles independently.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ffyntao20ibjkw8ipe2qz.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ffyntao20ibjkw8ipe2qz.webp" alt="Build trends and Elixir-version configuration insights for a Phoenix project" width="799" height="534"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;The real Builds dashboard, populated with synthetic data for a Phoenix demo project.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The timeline lets you follow that work alongside type checking, writing modules to disk, and the machine's CPU, memory, network, and disk usage. If the CPU is mostly idle during a long wait, you can look at what the compiler was waiting for. Warnings, errors, and the build's outcome are recorded with it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fvw8syp2gl9bpaz0h45u6.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fvw8syp2gl9bpaz0h45u6.webp" alt="A Mix compilation timeline alongside CPU, memory, network, and disk measurements" width="800" height="817"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;A clean compilation in the same synthetic demo, with file compilation, type checking, and machine metrics on one timeline.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;We want agents to be able to investigate this too. Build summaries, including durations, warning and error counts, and cache activity, are already available through the API and our &lt;a href="https://tuist.dev/en/docs/guides/features/agentic-coding/mcp" rel="noopener noreferrer"&gt;MCP tools&lt;/a&gt;. The per-file graph and detailed timeline are currently in the dashboard; we still need to expose those for agents to do the same investigation.&lt;/p&gt;

&lt;p&gt;From there, we can connect a file's compilation history with its position in the graph and how often it changes. A frequently edited module that forces half the application to recompile is a different problem from an expensive module that rarely changes. We'd like an agent to identify those cases, suggest a change, and use subsequent builds to check whether it helped.&lt;/p&gt;

&lt;p&gt;For now, the &lt;a href="https://tuist.dev/en/docs/guides/features/build-insights/elixir" rel="noopener noreferrer"&gt;Elixir build insights guide&lt;/a&gt; covers how to collect the data and explore it yourself. We think it's worth doing before build times become a problem for the team.&lt;/p&gt;

&lt;h2&gt;
  
  
  Test insights for ExUnit
&lt;/h2&gt;

&lt;p&gt;Tests have a similar problem: the output of one run tells you what happened, but not much about how the suite is changing. Is that test getting slower? Has it failed before with the same code? We collect individual results and durations, including doctests, organized by module and &lt;code&gt;describe&lt;/code&gt; block. Failures keep their message and location, so you and your agents can follow them across runs through the dashboard, API, or MCP.&lt;/p&gt;

&lt;p&gt;Elixir gives us a good starting point for improving the suite, too. Each &lt;a href="https://hexdocs.pm/ex_unit/ExUnit.html" rel="noopener noreferrer"&gt;ExUnit&lt;/a&gt; test runs in its own process. If we avoid shared state, asynchronous test modules can run concurrently, using more of the available cores for CPU-bound work. Databases and external services aren't isolated just because the tests have separate processes, so there's still work to do in how we design them. The &lt;a href="https://tuist.dev/en/docs/guides/features/test-insights/elixir" rel="noopener noreferrer"&gt;test insights guide&lt;/a&gt; covers what we collect to help with that work.&lt;/p&gt;

&lt;h3&gt;
  
  
  Test sharding
&lt;/h3&gt;

&lt;p&gt;Once we know how long the tests take, we can use that information to distribute them across CI runners. ExUnit handles concurrency within one machine; sharding lets us spread the suite across several.&lt;/p&gt;

&lt;p&gt;There are already good ways to split a suite. &lt;a href="https://github.com/plausible/analytics/blob/master/.github/workflows/elixir.yml" rel="noopener noreferrer"&gt;Plausible's CI&lt;/a&gt;, for example, uses Mix's built-in partitioning across six runners. Mix sorts the test files and distributes them round-robin, so there's no manual file list to maintain. But an equal number of files doesn't mean an equal amount of work. One runner can still be busy long after the others finish.&lt;/p&gt;

&lt;p&gt;Tuist uses historical timings to assign the files instead. You choose how many shards you want, for example with &lt;code&gt;--shard-total 4&lt;/code&gt;, or set a target maximum duration per shard and a limit on the shard count. As the suite changes, the plan changes with it. New files get estimates until we have measurements. You shouldn't need to keep moving files around to stop one runner holding up the rest.&lt;/p&gt;

&lt;p&gt;We also don't want each runner to compile the same project. Tuist compiles it once, uploads the build, and lets the runners download it and execute their assigned files. Their results appear as a single test run, with each shard's duration available in the dashboard. The &lt;a href="https://tuist.dev/en/docs/guides/features/test-sharding/elixir" rel="noopener noreferrer"&gt;sharding guide&lt;/a&gt; covers the CI setup, including any database preparation your project needs.&lt;/p&gt;

&lt;p&gt;We measured this locally on our own server: &lt;strong&gt;successful full-suite runs took 44.4% less wall-clock time with four shards&lt;/strong&gt;, running the same tests with the same total CPU budget.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fj4lfrh0dv1txfps4757a.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fj4lfrh0dv1txfps4757a.webp" alt="An Elixir test run combining results from four shards, with their individual durations" width="800" height="583"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Four shards reported as one test run in the real dashboard, using synthetic data for the Phoenix demo project.&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Flaky tests
&lt;/h3&gt;

&lt;p&gt;A faster suite isn't much help if you learn to ignore its failures. When the same test keeps passing on a retry, it's tempting to assume the next red build is just that test again. We want to keep the evidence of that flakiness, even when the retry turns CI green.&lt;/p&gt;

&lt;p&gt;Tuist compares passes and failures on the same commit across CI runs. You can also opt in to retries, which report a test that fails and then passes as flaky:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;mix &lt;span class="nb"&gt;test&lt;/span&gt; &lt;span class="nt"&gt;--retries&lt;/span&gt; 2
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Those attempts stay in the test's history. By default, an automation marks the test itself as flaky after three flaky runs in 30 days. You can change the threshold and recovery window in the project's automation settings, or mark a test manually.&lt;/p&gt;

&lt;p&gt;While a fix is in progress, you can &lt;a href="https://tuist.dev/en/docs/guides/features/test-insights/flaky-tests/elixir#quarantining" rel="noopener noreferrer"&gt;quarantine the test&lt;/a&gt; from the dashboard. Muting keeps it running and reporting failures, but those failures don't block an otherwise successful, complete run. Skipping leaves it out of the run. You can set either state manually or have an automation do it when a test becomes flaky, then return it to &lt;strong&gt;Enabled&lt;/strong&gt; once you've fixed it.&lt;/p&gt;

&lt;p&gt;Quarantine requires authentication, even for public projects. For now, muting doesn't apply with &lt;code&gt;--warnings-as-errors&lt;/code&gt; or from an umbrella project's root. Skipping uses a name filter, so it can also exclude a same-named test in another module, and explicit include filters can bring a skipped test back. Those limits matter when deciding how to use it in CI.&lt;/p&gt;

&lt;p&gt;Once a test is flagged, you can notify the team through &lt;a href="https://tuist.dev/en/docs/guides/integrations/slack#flaky-test-alerts" rel="noopener noreferrer"&gt;Slack&lt;/a&gt;. Or, with an event-capable client and a webhook, use the &lt;code&gt;test_case.marked_flaky&lt;/code&gt; event from our &lt;a href="https://tuist.dev/en/docs/guides/features/agentic-coding/mcp#events" rel="noopener noreferrer"&gt;MCP Events interface&lt;/a&gt; to have an agent investigate its history and failures. We'd like to get to a point where those investigations start without someone having to notice the problem in CI first.&lt;/p&gt;

&lt;p&gt;The &lt;a href="https://tuist.dev/en/docs/guides/features/test-insights/flaky-tests/elixir" rel="noopener noreferrer"&gt;flaky tests guide&lt;/a&gt; covers detection, retries, quarantine, and notifications.&lt;/p&gt;

&lt;h3&gt;
  
  
  Code coverage
&lt;/h3&gt;

&lt;p&gt;Sharding also changes how we need to collect coverage. Four runners each see only part of the suite. We need to bring those measurements together before saying how much of the code the tests exercised, and make sure restoring compiled code from a cache doesn't leave it out.&lt;/p&gt;

&lt;p&gt;Coverage is in early access and needs to be enabled for your account. Once enabled, the package reports it alongside the test results when you run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;mix &lt;span class="nb"&gt;test&lt;/span&gt; &lt;span class="nt"&gt;--cover&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can inspect the results by file, function, and OTP application. With sharding, enable &lt;code&gt;--cover&lt;/code&gt; both when building the shards and when running them. After every job measuring coverage for a commit has finished, a final CI job marks it complete:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;mix tuist.coverage.complete
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That tells us when to reconcile the reports for the branch's coverage trend. If you deliberately run only part of the suite, we report the coverage as partial. The &lt;a href="https://hexdocs.pm/tuist_ex/readme.html#report-code-coverage" rel="noopener noreferrer"&gt;package's coverage reference&lt;/a&gt; covers the setup.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fjb495oa8jh72fz46zb6e.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fjb495oa8jh72fz46zb6e.webp" alt="Elixir code coverage trends, covered and executable lines, and changes by source file and OTP application" width="800" height="624"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;The real Code Coverage dashboard with synthetic data for the Phoenix demo project: coverage over time, and changes across Elixir files and OTP applications.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;We're working on selective testing next, using coverage data to understand which tests exercise the code that changed. That would let us run the affected tests instead of the whole suite for every change. It isn't available for Elixir yet, but we hope to let teams try it soon.&lt;/p&gt;

&lt;h2&gt;
  
  
  Elixir dependency caching
&lt;/h2&gt;

&lt;p&gt;We use a lot of dependencies, and CI keeps compiling the same versions. It feels wasteful, especially when another build has just done that work. But before we reuse a result, we need to know what went into it and what we'd skip by not compiling again.&lt;/p&gt;

&lt;p&gt;The same inputs must produce the same outputs, without side effects that the next build still needs. That's what we mean by hermetic compilation. A macro can read an environment variable, a file outside the dependency, the clock, or a network response while compiling. We can't automatically discover all of those reads. If an input changes without us knowing, we might reuse stale code.&lt;/p&gt;

&lt;p&gt;We started with dependencies because their resolved versions and sources give us a useful starting point. The cache key also includes upstream compiled dependencies and resources, the toolchain, compiler options, effective application configuration, Mix environment and target, and any additional inputs you declare. The setup above enables caching for supported &lt;a href="https://hex.pm/" rel="noopener noreferrer"&gt;Hex&lt;/a&gt; and &lt;a href="https://git-scm.com/" rel="noopener noreferrer"&gt;Git&lt;/a&gt; dependencies using the standard Mix pipeline with Elixir or Erlang sources, and ordinary &lt;a href="https://www.rebar3.org/" rel="noopener noreferrer"&gt;rebar3&lt;/a&gt; compilation. It doesn't cache your application's own source files.&lt;/p&gt;

&lt;p&gt;You'll need to declare additional file and environment inputs where compilation uses them. Dependencies that rely on time, network responses, or side effects that must happen on every build should be excluded. Native and custom builders need an explicit audit and configuration of their build environment, required outputs, and additional inputs. Otherwise they compile normally, as do local dependencies and unsupported dependency chains. Using the standard compiler doesn't, on its own, prove that a dependency is hermetic. The &lt;a href="https://tuist.dev/en/docs/guides/features/cache/elixir-advanced" rel="noopener noreferrer"&gt;advanced cache guide&lt;/a&gt; goes into that in more detail.&lt;/p&gt;

&lt;p&gt;When we can reuse a result, Tuist looks locally first, then in the shared remote cache. A miss compiles normally and stores the result for later builds. If the cache or authentication is unavailable, compilation falls back to Mix. You can see the hits, transfers, and recent builds in the Mix Cache dashboard.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fi06yexr9ueyd7egdlkb6.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fi06yexr9ueyd7egdlkb6.webp" alt="The Mix Cache dashboard showing hit-rate trends, cache transfers, latency, throughput, and recent builds" width="800" height="878"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;The real Mix Cache dashboard with synthetic client cache observations. These numbers illustrate the interface, not measured performance or savings.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;We tried it on our own server: &lt;strong&gt;compilation took 33.6% less time with a warm local dependency cache&lt;/strong&gt;, while still compiling all of our application's own code.&lt;/p&gt;

&lt;p&gt;Of course, looking up and downloading compiled code takes time too. That's why we've invested in &lt;a href="https://tuist.dev/blog/2026/09/14/kura" rel="noopener noreferrer"&gt;Kura, our distributed cache infrastructure&lt;/a&gt;. It replicates artifacts between cache nodes so builds can fetch them nearby. With our runners, we can place the cache close to the compute and reuse artifacts across jobs. We don't want to save time compiling only to spend it transferring the result. The &lt;a href="https://tuist.dev/en/docs/guides/features/cache/elixir" rel="noopener noreferrer"&gt;Elixir cache guide&lt;/a&gt; covers getting started.&lt;/p&gt;

&lt;h2&gt;
  
  
  Giving something back to Elixir
&lt;/h2&gt;

&lt;p&gt;Elixir has given our small team a lot. We get to build and operate software that would be harder for us to manage otherwise. We're thankful for that, and we'd like this work to be useful to the people building alongside us in the ecosystem.&lt;/p&gt;

&lt;p&gt;We've been using this integration on our own server for weeks. The &lt;a href="https://tuist.dev/tuist/server" rel="noopener noreferrer"&gt;Tuist server project&lt;/a&gt; is public, so you can look at real build and test data, beyond the synthetic examples in this post. There's also a &lt;a href="https://tuist.dev/livebook-dev/livebook" rel="noopener noreferrer"&gt;public project&lt;/a&gt; for &lt;a href="https://livebook.dev/" rel="noopener noreferrer"&gt;Livebook&lt;/a&gt; you can explore.&lt;/p&gt;

&lt;p&gt;If you maintain an open-source Elixir project, our &lt;a href="https://tuist.dev/blog/2024/04/25/tuist-cloud-free-for-open-source" rel="noopener noreferrer"&gt;open-source program&lt;/a&gt; gives you free access to these build and test features. &lt;a href="mailto:contact@tuist.dev"&gt;Send us your repository and Tuist account handle&lt;/a&gt;, and we'll help you get set up.&lt;/p&gt;

&lt;p&gt;And if you're using Elixir at work, we'd like to hear how your builds and tests are going. Where do you spend time waiting? What have you had to build yourselves? You can &lt;a href="https://cal.tuist.dev/team/tuist/tuist" rel="noopener noreferrer"&gt;book a call with us&lt;/a&gt; to talk about it. We have our own experience running Tuist, but there's a lot more for us to learn from yours.&lt;/p&gt;

</description>
      <category>elixir</category>
      <category>tuist</category>
      <category>devops</category>
      <category>testing</category>
    </item>
    <item>
      <title>The physics of build systems</title>
      <dc:creator>Pedro Piñera Buendía</dc:creator>
      <pubDate>Fri, 09 Oct 2026 10:58:05 +0000</pubDate>
      <link>https://dev.to/tuist/the-physics-of-build-systems-i2e</link>
      <guid>https://dev.to/tuist/the-physics-of-build-systems-i2e</guid>
      <description>&lt;p&gt;At first, a build looks simple. Change a file, run a command, and a compiler turns the source into something you can ship or test. On a small project, that is close enough to the whole story. The machine has work to do, it does it, and a few moments later you have an answer.&lt;/p&gt;

&lt;p&gt;Then the project grows. A change that should be local wakes up half the repository. A machine with more processor cores does not make the build noticeably faster. A cache makes some builds fly and seems to do nothing for others. At that point, it is tempting to think there must be one slow compiler, one badly configured cache, or one sufficiently large machine that will make the problem go away. Usually there is not.&lt;/p&gt;

&lt;p&gt;In our &lt;a href="https://tuist.dev/blog/2026/06/30/three-build-systems-one-graph" rel="noopener noreferrer"&gt;last post&lt;/a&gt;, we introduced &lt;a href="https://github.com/tuist/once" rel="noopener noreferrer"&gt;Once&lt;/a&gt;, our prototype for making remote caching and execution accessible without asking people to replace the build systems they already use. Building it has forced us to get more precise about what actually makes a build fast.&lt;/p&gt;

&lt;p&gt;If object storage is cheap, why not put a cache there and call it done? Will adding more processor cores make a build faster? If a continuous integration provider already offers a cache, what is missing? And if a project is already using a remote cache, why can the build still feel slow?&lt;/p&gt;

&lt;p&gt;Start with a graph of tasks. On its own, it is only a description. The moment it meets a machine, the description turns into work, and the machine has only so much capacity to give it. Those constraints are the physics of build systems.&lt;/p&gt;

&lt;h2&gt;
  
  
  The parameters of a build
&lt;/h2&gt;

&lt;p&gt;Start with computation. We will come back to moving data later. Take a small target with two source files. Before it can produce an executable, it has to compile both files, then hand their object files to the linker. The build engine sees three tasks: two compilations with no relationship to each other, and a link task that needs the output of both. That relationship is the &lt;strong&gt;graph&lt;/strong&gt;. It is not just a convenient way to describe a build after the fact. It decides what the machine is allowed to do at any given moment.&lt;/p&gt;

&lt;p&gt;The simulator below uses generic task names. What matters is not whether a task is a compilation, a link, or something else. It is how much work the task has, what must finish before it can begin, and what the machine has available to run it.&lt;/p&gt;

&lt;p&gt;Try changing the machine and the number of tasks below. Every task in this model takes the same amount of time. It starts with three tasks: two can run immediately, while the third waits for both. As you add tasks, the graph grows wider and deeper. More work becomes available at once, but more layers also have to wait for the work before them. Extra processor cores can help with the first part. They cannot remove the second.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;🧪 &lt;strong&gt;Interactive simulator:&lt;/strong&gt; this section has a live model you can play with in the &lt;a href="https://tuist.dev/blog/2026/08/25/the-physics-of-build-systems" rel="noopener noreferrer"&gt;original post on tuist.dev&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Say each task contains the same amount of &lt;strong&gt;work&lt;/strong&gt;, enough to occupy one processor for ten seconds. On a machine with one processor core, the two initial tasks have to take turns, and the final task runs last. The build takes thirty seconds. Increase &lt;strong&gt;processor speed&lt;/strong&gt; and each task finishes sooner. Add a second processor core and the two initial tasks can run together, so the final task begins after ten seconds and the whole build takes twenty. This is the result people expect when they buy a bigger machine, and it is real, provided the build has enough independent work to keep the machine busy.&lt;/p&gt;

&lt;p&gt;Now give that same build thirty-two &lt;strong&gt;processor cores&lt;/strong&gt;. It still takes twenty seconds. At the start, only two tasks are ready. When they finish, only the final task is ready. The rest of the machine is idle because no scheduler can start a task before the input it needs exists. Large builds have thousands of tasks instead of three, but they are subject to the same limit.&lt;/p&gt;

&lt;p&gt;There are two useful ways to see that limit. One is the total amount of work divided across the processor cores. If enough tasks are ready, more cores lower that number. The other is the longest chain of tasks that must happen in order. More cores cannot shorten that chain. A build cannot finish before either limit allows it to.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;The graph is part of the performance budget.&lt;/strong&gt; It decides which tasks can use the machine at the same time and which must wait. Buying a faster machine or adding processor cores is tempting because it is immediate. But if the graph does not expose enough independent work, that extra capacity sits idle. Make the graph easier to run first. Then bigger machines have something to accelerate.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;In the simulator, a unit of work is one second of processor time on a reference machine. This is only a model. In a real build, recorded processor time is a useful estimate, but wall-clock time also includes waiting for dependencies, memory pressure, scheduling, and eventually moving data. Caches and networks change the picture too. We will get to them, but the graph comes first.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where the work comes from
&lt;/h2&gt;

&lt;p&gt;A clean build, where every task has to run, is a useful starting point. But most developers do not work that way. They change a file, run the build again, change another file, and run it again. An incremental build looks at that change, finds the part of the graph it can affect, and leaves everything else alone. It still has to answer two questions: what needs to rebuild, and when can the required work run? They are different decisions, a distinction explored in &lt;a href="https://simon.peytonjones.org/assets/pdfs/build-systems-original.pdf" rel="noopener noreferrer"&gt;Build Systems à la Carte&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;For one changed file, the affected part of the graph contains the task that reads it and every downstream task whose result could now be different. It is usually much smaller than the graph for the whole project. That is what incremental compilation buys us. It removes tasks from the build, and it can shorten the &lt;strong&gt;longest dependency path&lt;/strong&gt; that remains. It cannot turn a dependency into independent work, but it can make that dependency irrelevant for the change in front of you.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;🧪 &lt;strong&gt;Interactive simulator:&lt;/strong&gt; this section has a live model you can play with in the &lt;a href="https://tuist.dev/blog/2026/08/25/the-physics-of-build-systems" rel="noopener noreferrer"&gt;original post on tuist.dev&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Over time, the number that matters is not the cost of one arbitrary edit. It is the &lt;strong&gt;cost of the edits a team actually makes&lt;/strong&gt;, weighted by &lt;strong&gt;how often they happen&lt;/strong&gt;.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;An incremental build is a distribution, not a single number.&lt;/strong&gt; A slow path that nobody changes is less important than a moderately slow path that developers touch all day.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;There are two dimensions to a build: the graph, and the way that graph changes over time. The graph tells us the cost of one change, what has to rebuild, what can run in parallel, and what must wait. History tells us which changes the team actually makes. A shared module with many downstream dependents might be exactly what the project needs. It becomes an everyday cost only when it changes often, or when rebuilding it lands on a long path through the build. Put those two dimensions together and the questions become useful: which modules change most, how far do those changes travel, and which ones add time to a build already waiting on other work?&lt;/p&gt;

&lt;p&gt;Looking at a graph or a build in isolation misses that intersection. A graph can show what might be expensive. An individual build can show what happened once. Neither says whether developers regularly pay that cost. &lt;a href="https://tuist.dev/en/docs/guides/features/build-insights" rel="noopener noreferrer"&gt;Build Insights&lt;/a&gt; keeps the history of local and continuous integration builds, so the graph can be read alongside the way a project is actually used. At Tuist, we do not think caching and execution are enough on their own. Connecting a project should also give a team the data it needs to make better decisions about its setup.&lt;/p&gt;

&lt;p&gt;Architecture turns this into a design problem. Shared foundations need to be small and stable, while fast-moving code needs boundaries that keep its changes from waking up the rest of the project. Then the cache and the extra machines have something worthwhile to accelerate. We will come back to the trade-offs behind those choices in a future post.&lt;/p&gt;

&lt;h2&gt;
  
  
  Incrementality across worktrees
&lt;/h2&gt;

&lt;p&gt;Open a feature, a review, and a small fix at the same time. Most files are unchanged between them. So are the dependencies, compiler, and a surprising amount of the work. Worktrees let those copies coexist without stepping on one another, but a build system usually meets each copy as if it were a new project.&lt;/p&gt;

&lt;p&gt;There are two ways to carry work from one build to the next. &lt;strong&gt;Incrementality by location&lt;/strong&gt; keeps mutable state in a build directory and benefits only when the next build returns to that directory. A second worktree has a second directory, so it starts without the first worktree's incremental state. &lt;strong&gt;Incrementality by identity&lt;/strong&gt; names the result of a task by the inputs, toolchain, settings, and dependencies that produced it. Two worktrees can keep their own graphs and bookkeeping, but still ask for the same result.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;🧪 &lt;strong&gt;Interactive simulator:&lt;/strong&gt; this section has a live model you can play with in the &lt;a href="https://tuist.dev/blog/2026/08/25/the-physics-of-build-systems" rel="noopener noreferrer"&gt;original post on tuist.dev&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Xcode is a familiar example of the first approach. Its DerivedData directory holds the build products and bookkeeping that make a later build incremental. Another checkout usually has another DerivedData directory, even when the source trees are nearly identical. &lt;a href="https://www.swift.org/documentation/package-manager/" rel="noopener noreferrer"&gt;Swift Package Manager&lt;/a&gt;, &lt;a href="https://doc.rust-lang.org/cargo/reference/build-cache.html" rel="noopener noreferrer"&gt;Cargo&lt;/a&gt;, and &lt;a href="https://hexdocs.pm/mix/Mix.html" rel="noopener noreferrer"&gt;Mix&lt;/a&gt; also use local build directories. The normal consequence is simple: worktree B rebuilds work already completed in worktree A.&lt;/p&gt;

&lt;p&gt;Sharing one directory changes the failure mode, rather than creating reuse. Two builds that point at the same directory have to coordinate updates to mutable state. The safe response is a lock: one build waits while the other changes the bookkeeping.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;A shared build directory is a queue, not a cache.&lt;/strong&gt; It protects mutable state, but the second build still waits for the first.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Xcode's compilation cache uses the second approach for cacheable compiler work: it looks up a result by its content-addressed identity rather than through a worktree's DerivedData directory. Bazel, when it uses a disk or remote cache, does the same. Its &lt;a href="https://bazel.build/remote/caching" rel="noopener noreferrer"&gt;action cache and content-addressable storage&lt;/a&gt; keep the lookup from an action to its result separate from the output files themselves. That is why another checkout can reuse the work without borrowing the first checkout's build directory.&lt;/p&gt;

&lt;p&gt;The boundary is not native tools on one side and Bazel on the other. Go and Gradle have forms of action caching too, and Cargo can use &lt;code&gt;sccache&lt;/code&gt; to share built dependencies. Go's &lt;a href="https://pkg.go.dev/cmd/go#hdr-Build_and_test_caching" rel="noopener noreferrer"&gt;build cache&lt;/a&gt;, for example, lives outside the project and is safe for concurrent builds. But unless a build uses &lt;code&gt;-trimpath&lt;/code&gt;, the path of a local package can end up in debug information. Two worktrees with the same source are therefore not always asking Go for the same result. What matters is where a tool puts the state it needs to reuse work.&lt;/p&gt;

&lt;p&gt;For tools that keep that state in a directory, the obvious answer in continuous integration is to keep the directory around. The next job mounts a volume with the last build's outputs and database. From the tool's perspective, it looks like the previous build never ended. We will call this a sticky volume. It makes a directory-scoped build feel incremental. It does not make the work inside that directory broadly reusable.&lt;/p&gt;

&lt;h2&gt;
  
  
  Making a build directory stick
&lt;/h2&gt;

&lt;p&gt;The idea is appealing because it can be effective quickly. A branch can start from a fork of the volume that its base commit produced, then keep its own volume from there. Its next build lands on a runner that can mount it. Dependencies are already fetched, generated files are still there, and an incremental compiler sees the state it expects. The difficulty appears when there is more than one plausible volume. Should a pull request inherit its branch's last build, the main branch, or the closest common commit? If every branch gets its own volume, each one starts cold and storage grows with the number of active branches. If they all share one, the build system is back to locking a mutable directory.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;🧪 &lt;strong&gt;Interactive simulator:&lt;/strong&gt; this section has a live model you can play with in the &lt;a href="https://tuist.dev/blog/2026/08/25/the-physics-of-build-systems" rel="noopener noreferrer"&gt;original post on tuist.dev&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The volume also becomes a &lt;strong&gt;scheduling constraint&lt;/strong&gt;. A volume that can be written by one node restricts where a job can run. A shared read-write volume has different storage and concurrency requirements. &lt;a href="https://kubernetes.io/docs/concepts/storage/persistent-volumes/" rel="noopener noreferrer"&gt;Kubernetes makes those choices explicit through volume access modes&lt;/a&gt;. The runner still has to choose the right volume, place the job on a machine that can mount it, and prevent two writers from corrupting the same state.&lt;/p&gt;

&lt;p&gt;That is &lt;strong&gt;operational complexity&lt;/strong&gt;, not cache configuration. Someone has to create and retire volumes, choose which history a job inherits, keep data close to the machine that needs it, and coordinate concurrent jobs. &lt;a href="https://tuist.dev/en/docs/guides/get-started/tuist-runners" rel="noopener noreferrer"&gt;Tuist Runners&lt;/a&gt; handles that runner infrastructure and connects jobs to a cache shared with developer machines. The job can reuse valid results without a team having to select and mount yesterday's mutable build directory.&lt;/p&gt;

&lt;p&gt;There is also a &lt;strong&gt;correctness boundary&lt;/strong&gt;. A persistent build directory is not automatically flaky, but it preserves more than source files. It can hold paths, software development kit state, compiler outputs, and assumptions about the machine that last wrote to it. A sound build system notices the difference and rebuilds. A missed input can turn into the kind of failure that only appears on one runner, after one particular sequence of jobs. Absolute paths and undeclared environment variables are common reasons shared caches either miss or reuse the wrong thing. &lt;a href="https://docs.gradle.org/current/userguide/build_cache.html" rel="noopener noreferrer"&gt;Gradle's cache documentation&lt;/a&gt; treats both as part of making a task relocatable.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;A sticky volume does not make a build system share work. It makes one runner remember it.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Persistent volumes are still useful. They are a good home for downloads, source mirrors, and other state deliberately designed to survive a new checkout. But they leave the platform choosing a history for every job and carrying the cost of that choice. A task-result cache has a narrower question: are these inputs the same? If they are, it can reuse the result wherever the next build happens to run. That is the second model in practice: reuse follows the identity of the work, not the directory that happened to run it last.&lt;/p&gt;

&lt;h2&gt;
  
  
  The distance to a cache
&lt;/h2&gt;

&lt;p&gt;A task-result cache makes reuse portable, but it changes the question. The build no longer needs the previous directory. It needs a result that may be somewhere else. That brings us back to the question from the beginning: if object storage is cheap, why not put the cache there? Object storage can hold the artifacts, and often should. But the price of keeping those bytes says almost nothing about the time it takes to serve a build.&lt;/p&gt;

&lt;p&gt;Cost changes with the traffic shape too. Many managed object stores charge not only for bytes at rest, but also for requests, retrievals, transfer, and sometimes replication. A cache full of small artifacts can turn a modest amount of stored data into a great many operations. That may be immaterial for one team and material for another, but it is another reason to evaluate the cache path, not only the storage price.&lt;/p&gt;

&lt;p&gt;Every remote cache hit has two time components. &lt;strong&gt;Latency&lt;/strong&gt; is the time spent waiting for a request to reach the cache and a response to begin. &lt;strong&gt;Bandwidth&lt;/strong&gt; is how quickly the artifact can move once that response arrives. A useful lower bound for a cache hit is:&lt;/p&gt;

&lt;p&gt;

&lt;/p&gt;
&lt;div class="katex-element"&gt;
  &lt;span class="katex-display"&gt;&lt;span class="katex"&gt;&lt;span class="katex-mathml"&gt;&lt;/span&gt;&lt;span class="katex-html"&gt;&lt;span class="base"&gt;&lt;span class="strut"&gt;&lt;/span&gt;&lt;span class="mord"&gt;&lt;span class="mord mathnormal"&gt;T&lt;/span&gt;&lt;span class="msupsub"&gt;&lt;span class="vlist-t vlist-t2"&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;span class="pstrut"&gt;&lt;/span&gt;&lt;span class="sizing reset-size6 size3 mtight"&gt;&lt;span class="mord mtight"&gt;&lt;span class="mord mtight"&gt;&lt;span class="mord mathrm mtight"&gt;hit&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-s"&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="mspace"&gt;&lt;/span&gt;&lt;span class="mrel"&gt;≥&lt;/span&gt;&lt;span class="mspace"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="base"&gt;&lt;span class="strut"&gt;&lt;/span&gt;&lt;span class="mord mathnormal"&gt;R&lt;/span&gt;&lt;span class="mspace"&gt;&lt;/span&gt;&lt;span class="mbin"&gt;×&lt;/span&gt;&lt;span class="mspace"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="base"&gt;&lt;span class="strut"&gt;&lt;/span&gt;&lt;span class="mord mathnormal"&gt;L&lt;/span&gt;&lt;span class="mspace"&gt;&lt;/span&gt;&lt;span class="mbin"&gt;+&lt;/span&gt;&lt;span class="mspace"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="base"&gt;&lt;span class="strut"&gt;&lt;/span&gt;&lt;span class="mord"&gt;&lt;span class="mopen nulldelimiter"&gt;&lt;/span&gt;&lt;span class="mfrac"&gt;&lt;span class="vlist-t vlist-t2"&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;span class="pstrut"&gt;&lt;/span&gt;&lt;span class="mord"&gt;&lt;span class="mord mathnormal"&gt;B&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span class="pstrut"&gt;&lt;/span&gt;&lt;span class="frac-line"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span class="pstrut"&gt;&lt;/span&gt;&lt;span class="mord"&gt;&lt;span class="mord mathnormal"&gt;S&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-s"&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="mclose nulldelimiter"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;/div&gt;


&lt;p&gt;Here, 
&lt;span class="katex-element"&gt;
  &lt;span class="katex"&gt;&lt;span class="katex-mathml"&gt;&lt;/span&gt;&lt;span class="katex-html"&gt;&lt;span class="base"&gt;&lt;span class="strut"&gt;&lt;/span&gt;&lt;span class="mord mathnormal"&gt;R&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;/span&gt;
 is the number of request-response steps that cannot overlap, 
&lt;span class="katex-element"&gt;
  &lt;span class="katex"&gt;&lt;span class="katex-mathml"&gt;&lt;/span&gt;&lt;span class="katex-html"&gt;&lt;span class="base"&gt;&lt;span class="strut"&gt;&lt;/span&gt;&lt;span class="mord mathnormal"&gt;L&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;/span&gt;
 is latency, 
&lt;span class="katex-element"&gt;
  &lt;span class="katex"&gt;&lt;span class="katex-mathml"&gt;&lt;/span&gt;&lt;span class="katex-html"&gt;&lt;span class="base"&gt;&lt;span class="strut"&gt;&lt;/span&gt;&lt;span class="mord mathnormal"&gt;S&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;/span&gt;
 is the number of bytes to transfer, and 
&lt;span class="katex-element"&gt;
  &lt;span class="katex"&gt;&lt;span class="katex-mathml"&gt;&lt;/span&gt;&lt;span class="katex-html"&gt;&lt;span class="base"&gt;&lt;span class="strut"&gt;&lt;/span&gt;&lt;span class="mord mathnormal"&gt;B&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;/span&gt;
 is the effective bandwidth. It is a lower bound, not a prediction. Real cache hits also pay for cache lookup, decompression, and work that cannot be parallelized.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;🧪 &lt;strong&gt;Interactive simulator:&lt;/strong&gt; this section has a live model you can play with in the &lt;a href="https://tuist.dev/blog/2026/08/25/the-physics-of-build-systems" rel="noopener noreferrer"&gt;original post on tuist.dev&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;When 
&lt;span class="katex-element"&gt;
  &lt;span class="katex"&gt;&lt;span class="katex-mathml"&gt;&lt;/span&gt;&lt;span class="katex-html"&gt;&lt;span class="base"&gt;&lt;span class="strut"&gt;&lt;/span&gt;&lt;span class="mord mathnormal"&gt;R&lt;/span&gt;&lt;span class="mspace"&gt;&lt;/span&gt;&lt;span class="mbin"&gt;×&lt;/span&gt;&lt;span class="mspace"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="base"&gt;&lt;span class="strut"&gt;&lt;/span&gt;&lt;span class="mord mathnormal"&gt;L&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;/span&gt;
 dominates, the cache is &lt;strong&gt;latency-bound&lt;/strong&gt;. A result split across thousands of small blobs can spend much of its time waiting for requests, unless the cache client batches metadata, reuses connections, prefetches, and downloads in parallel. When 
&lt;span class="katex-element"&gt;
  &lt;span class="katex"&gt;&lt;span class="katex-mathml"&gt;&lt;/span&gt;&lt;span class="katex-html"&gt;&lt;span class="base"&gt;&lt;span class="strut"&gt;&lt;/span&gt;&lt;span class="mord"&gt;&lt;span class="mopen nulldelimiter"&gt;&lt;/span&gt;&lt;span class="mfrac"&gt;&lt;span class="vlist-t vlist-t2"&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;span class="pstrut"&gt;&lt;/span&gt;&lt;span class="sizing reset-size6 size3 mtight"&gt;&lt;span class="mord mtight"&gt;&lt;span class="mord mathnormal mtight"&gt;B&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span class="pstrut"&gt;&lt;/span&gt;&lt;span class="frac-line"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span class="pstrut"&gt;&lt;/span&gt;&lt;span class="sizing reset-size6 size3 mtight"&gt;&lt;span class="mord mtight"&gt;&lt;span class="mord mathnormal mtight"&gt;S&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-s"&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="mclose nulldelimiter"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;/span&gt;
 dominates, it is &lt;strong&gt;bandwidth-bound&lt;/strong&gt;: artifact size and the available network throughput decide how long the transfer takes. Some lookups still sit on the dependency path, so their latency lands directly on wall-clock time. Concurrent requests can help throughput, and keeping compute in the same region reduces latency, but neither makes a distant object store behave like a local file system.&lt;/p&gt;

&lt;p&gt;That is what &lt;strong&gt;infrastructure collocation&lt;/strong&gt; means here. Cache and execution should sit on a short, high-bandwidth network path. In &lt;a href="https://docs.tuist.dev/guides/features/runners" rel="noopener noreferrer"&gt;Tuist Runners&lt;/a&gt;, compute and cache sit on the same private network. Keeping latency low and bandwidth high is part of the environment we operate, not a setting we ask a team to tune after the fact. But runners are not the whole picture. Developer machines can be spread across regions, and remote coding environments such as &lt;a href="https://openai.com/codex/" rel="noopener noreferrer"&gt;Codex&lt;/a&gt; and &lt;a href="https://www.anthropic.com/claude-code" rel="noopener noreferrer"&gt;Claude Code&lt;/a&gt; may reach a cache over the public internet. They should share the same valid results as the runners, but they cannot all be close to one central cache at once.&lt;/p&gt;

&lt;p&gt;This is why we are building &lt;a href="https://github.com/tuist/tuist/tree/main/kura" rel="noopener noreferrer"&gt;Kura&lt;/a&gt; as a decentralized cache mesh. A Kura node serves hot reads from its own disk and replicates artifacts and metadata to its peers. Kura is designed to sit beside our runners and to be deployed across regions, so each environment can have a nearby cache path while still sharing results with the rest of the team. In terms of the earlier bound, it is designed to reduce 
&lt;span class="katex-element"&gt;
  &lt;span class="katex"&gt;&lt;span class="katex-mathml"&gt;&lt;/span&gt;&lt;span class="katex-html"&gt;&lt;span class="base"&gt;&lt;span class="strut"&gt;&lt;/span&gt;&lt;span class="mord mathnormal"&gt;L&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;/span&gt;
 without giving up the shared history that makes a remote cache useful in the first place.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;🧪 &lt;strong&gt;Interactive simulator:&lt;/strong&gt; this section has a live model you can play with in the &lt;a href="https://tuist.dev/blog/2026/08/25/the-physics-of-build-systems" rel="noopener noreferrer"&gt;original post on tuist.dev&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A remote cache hit is only a win when retrieving the result is faster than producing it again.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  The limits of one machine
&lt;/h2&gt;

&lt;p&gt;Collocation makes a cache hit fast. It does not help when there is no result to fetch. New work, invalidated work, and a task nobody has run before still need a machine. The limit returns to where we started: the finite number of processor cores in the environment that started the build. That machine can run the tasks that are ready in the graph, and no more.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Remote execution&lt;/strong&gt; is the next step. Instead of keeping every cache miss on the machine that started the build, the build system can send a ready task to a pool of workers. Those workers need to be warm: they need the right toolchain, system image, and enough capacity to begin without first reconstructing the environment. They run the task and return the result to the shared cache. More workers help only when the graph has enough ready work to fill them, just as more processor cores help only when one machine has enough independent work. A long dependency chain still runs one step at a time.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;A remote cache avoids work that has already been done. Remote execution gives the work that remains more places to run.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This is not a common capability in native toolchains. &lt;a href="https://bazel.build/remote/rbe" rel="noopener noreferrer"&gt;Bazel's remote execution support&lt;/a&gt; is explicitly designed to distribute build and test actions across multiple machines. &lt;a href="https://buck2.build/docs/users/remote_execution/" rel="noopener noreferrer"&gt;Buck2&lt;/a&gt; can use the same open remote-execution protocol to run actions remotely or locally. In both cases, the build describes enough about an action to move it safely: the inputs, outputs, toolchain, settings, and environment it needs. That is what lets a worker execute a task without borrowing the state of the machine that requested it.&lt;/p&gt;

&lt;p&gt;Most native toolchains can parallelize compiler work on the machine they were started on, but do not offer this as the normal way to run a build. Remote caching can still cut the work dramatically, but cache misses remain limited by the processor cores in one environment. Remote execution is the extra mile: a way to turn a wide part of the graph into work that a fleet can absorb, provided those workers are close to the cache and ready when the work arrives.&lt;/p&gt;

&lt;h2&gt;
  
  
  What this means for teams
&lt;/h2&gt;

&lt;p&gt;None of this makes optimizing the graph optional. Caching removes repeated work, and remote execution adds capacity for the work that remains. Neither can make a deep chain run in parallel or stop a small change from waking up much of the project. The graph still sets the shape of every build; the history of changes tells us whether developers pay the cost often enough to care. That is why insights over time matter. We need the graph alongside build traces and real changes, not one isolated run, to see what should be fixed before buying faster hardware or more infrastructure.&lt;/p&gt;

&lt;p&gt;Tools that keep incremental state in a directory can be given sticky volumes, and that can be useful. But it trades an ordinary cache question for a scheduling problem: someone must maintain the volumes, decide which history a job inherits, keep it near compatible machines, and prevent concurrent writers. Tools with &lt;strong&gt;incrementality by identity&lt;/strong&gt; can share results through a cache instead. Then latency, bandwidth, and the cost of moving artifacts are the variables to manage. The more granular the artifacts, the more that placement matters: one build can turn into thousands of small lookups and transfers rather than a few large ones.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Infrastructure is a multiplier, not a replacement for a graph that makes useful work available.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Xcode's compilation cache already brings identity-based reuse to native Xcode projects and can deliver cache gains close to the systems built around remote caching. What it does not provide today is distributed execution. That remains the broader gap for native toolchains: most were designed around a developer building on one machine and still have work to do before they can use the amount of parallel build work a modern organization produces. People often ask us whether Xcode's compilation cache will grow into that kind of system. We do not know. It is a toolchain decision, and we do not know when, or whether, Apple will prioritize it.&lt;/p&gt;

&lt;p&gt;That uncertainty matters more now that coding agents can produce changes faster than many projects can validate them. If build feedback is already the bottleneck, &lt;a href="https://bazel.build" rel="noopener noreferrer"&gt;Bazel&lt;/a&gt; and &lt;a href="https://buck2.build" rel="noopener noreferrer"&gt;Buck2&lt;/a&gt; are sensible options because remote caching and remote execution are part of the model today. The trade-off is adoption: both ask a project to describe its build in their rules. If that is more change than a team can take on, we are prototyping &lt;a href="https://github.com/tuist/once" rel="noopener noreferrer"&gt;Once&lt;/a&gt; as a different entry point. Once works with an existing project and the scripts it already has, so a team can describe its automation gradually and connect it to caching and execution without first replacing the build system underneath. It is early, and we are looking for teams that feel this pressure and want to try it. Email us at &lt;a href="mailto:contact@tuist.dev"&gt;contact@tuist.dev&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;One condition sits underneath all of this. A remote cache or remote worker is only safe if a task's identity is real. &lt;strong&gt;Hermeticity&lt;/strong&gt; means accounting for every input a task needs. &lt;strong&gt;Deterministic hashing&lt;/strong&gt; means those declared inputs, together with the toolchain and settings, always produce the same cache key. We will look at both in a future post, along with the other constraints that make distributed builds fast without making them wrong.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published on the &lt;a href="https://tuist.dev/blog/2026/08/25/the-physics-of-build-systems" rel="noopener noreferrer"&gt;Tuist blog&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>buildsystems</category>
      <category>performance</category>
      <category>devops</category>
      <category>ios</category>
    </item>
    <item>
      <title>Xcode and Gradle: Two worlds, one infrastructure</title>
      <dc:creator>Pedro Piñera Buendía</dc:creator>
      <pubDate>Wed, 07 Oct 2026 14:13:40 +0000</pubDate>
      <link>https://dev.to/tuist/xcode-and-gradle-two-worlds-one-infrastructure-3l09</link>
      <guid>https://dev.to/tuist/xcode-and-gradle-two-worlds-one-infrastructure-3l09</guid>
      <description>&lt;p&gt;At Tuist, we are building a virtual platform team. Not every organization can afford a dedicated team to optimize builds, manage flaky tests, track app size, or streamline developer workflows. Tuist fills that role by going deep into build systems, understanding how they structure and persist data, and plugging into them to optimize workflows like compilations and test runs. Whether developers work alone or alongside coding agents, we want the tooling layer to just work.&lt;/p&gt;

&lt;p&gt;We have been doing this for Xcode for years. Understanding activity logs, result bundles, compilation graphs, the entire landscape of how Apple's toolchain turns source files into apps. Being close to the mobile ecosystem, jumping to Android through Gradle was a natural next step. And we were genuinely struck by how the work turned out. We shipped remote build caching, build insights, test insights, flaky test detection, bundle analysis, and previews for Gradle in about three weeks. Part of that speed came from features like bundle analysis and test insights being largely build-system-agnostic: once the data is extracted, it boils down to the same structures regardless of whether it came from Xcode or Gradle.&lt;/p&gt;

&lt;p&gt;This post is a walkthrough of both build systems from our perspective. If you are an Xcode developer curious about how things work on the Gradle side, or a Gradle developer who has never touched Apple's toolchain, this is for you.&lt;/p&gt;

&lt;h2&gt;
  
  
  The plugin model, or lack thereof
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://gradle.org/" rel="noopener noreferrer"&gt;Gradle&lt;/a&gt; is Android's build system, and more broadly, the dominant build system in the JVM ecosystem. If you have never used it: think of it as a programmable build system where builds are defined in Kotlin or Groovy scripts, and the system is designed from the ground up to be extended. It exposes a rich plugin API where you can hook into nearly every phase of the build lifecycle. You implement an interface, register your plugin, and Gradle calls you at the right time. Want to intercept cache operations? Implement &lt;a href="https://docs.gradle.org/current/javadoc/org/gradle/caching/BuildCacheService.html" rel="noopener noreferrer"&gt;&lt;code&gt;BuildCacheService&lt;/code&gt;&lt;/a&gt;. Want to observe every task as it finishes? Register an &lt;a href="https://docs.gradle.org/current/javadoc/org/gradle/tooling/events/OperationCompletionListener.html" rel="noopener noreferrer"&gt;&lt;code&gt;OperationCompletionListener&lt;/code&gt;&lt;/a&gt;. Want test results as they happen? Add a &lt;a href="https://docs.gradle.org/current/javadoc/org/gradle/api/tasks/testing/TestListener.html" rel="noopener noreferrer"&gt;&lt;code&gt;TestListener&lt;/code&gt;&lt;/a&gt;. The contracts are well-defined, documented, and stable.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://developer.apple.com/xcode/" rel="noopener noreferrer"&gt;Xcode&lt;/a&gt; is Apple's IDE for iOS, macOS, and the rest of Apple's platforms. The underlying build system is &lt;a href="https://github.com/swiftlang/swift-build" rel="noopener noreferrer"&gt;Swift Build&lt;/a&gt;, and &lt;a href="https://developer.apple.com/library/archive/technotes/tn2339/_index.html" rel="noopener noreferrer"&gt;&lt;code&gt;xcodebuild&lt;/code&gt;&lt;/a&gt; is the command-line executable bundled with Xcode to interact with projects from the terminal, for example to build them. If you come from the Gradle world: think of it as a more closed system where Apple controls both the IDE and the build pipeline, and there is no plugin model to speak of. Apple does not expose a way to say "call me when a compilation finishes" or "let me handle cache storage." Swift Build is open source now, but it is strongly coupled to Xcode and its release cycles. The same applies to &lt;a href="https://github.com/swiftlang/swift-package-manager" rel="noopener noreferrer"&gt;SwiftPM&lt;/a&gt;, Apple's package manager: you can contribute improvements or fixes, but they will not reach developers until Apple ships the next Xcode version. In practice, you feed the build system a project in its intermediate format (PIF, or Project Interchange Format) and it gives you output in the terminal and artifacts on disk. &lt;strong&gt;There are no extension points in between.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This single architectural difference shaped everything about how we built our integrations. With Gradle, we wrote a &lt;a href="https://plugins.gradle.org/plugin/dev.tuist" rel="noopener noreferrer"&gt;plugin&lt;/a&gt; in Kotlin that hooks directly into the build lifecycle. With Xcode, we had to get creative. We built a CLI that wraps &lt;code&gt;xcodebuild&lt;/code&gt; (Apple's command-line build tool), parses its artifacts after the fact, hooks into scheme post-actions to trigger data collection, and in some cases acts as a proxy between the build system and external services. Every feature required finding the right phase in the process where the data we needed was accessible.&lt;/p&gt;

&lt;h2&gt;
  
  
  Build caching
&lt;/h2&gt;

&lt;p&gt;Build caching is about not repeating work that has already been done. If a module or a compilation unit has not changed since the last build, there is no reason to compile it again. And if someone else on your team or CI has already compiled it, there is no reason for you to compile it either. The idea is simple, but the integration looks completely different depending on the build system.&lt;/p&gt;

&lt;p&gt;For most of Xcode's history, there was no concept of remote build caching. So we built one ourselves.&lt;/p&gt;

&lt;p&gt;In the early days of Tuist, we invested heavily in project generation. For context: Xcode projects are stored as &lt;code&gt;.xcodeproj&lt;/code&gt; files, a format that is notoriously difficult to manage at scale and causes constant merge conflicts in teams. Tuist lets you define your project in Swift and generates the Xcode project from that definition. Later, drawing ideas from package managers like &lt;a href="https://github.com/Carthage/Carthage" rel="noopener noreferrer"&gt;Carthage&lt;/a&gt; (a dependency manager for Apple platforms that builds frameworks from source), we built &lt;a href="https://tuist.dev/en/docs/guides/features/cache/xcode-cache" rel="noopener noreferrer"&gt;module-level binary caching&lt;/a&gt; on top of it. You can see how this looks in practice on &lt;a href="https://tuist.dev/tuist/tuist/module-cache" rel="noopener noreferrer"&gt;our own project's cache dashboard&lt;/a&gt;. Because we understand the project graph, we can determine which modules have not changed, replace them with pre-compiled binaries, and generate a project that skips compiling them entirely. This happens before the build even starts. It requires deep knowledge of the dependency graph and control over how the project is generated, which is why it is tightly coupled to Tuist's project generation layer.&lt;/p&gt;

&lt;p&gt;Then Apple introduced compilation caching in &lt;a href="https://developer.apple.com/documentation/xcode-release-notes/xcode-26-release-notes" rel="noopener noreferrer"&gt;Xcode 26&lt;/a&gt; using &lt;a href="https://llvm.org/" rel="noopener noreferrer"&gt;LLVM&lt;/a&gt;'s Content Addressable Storage (CAS). For Gradle developers unfamiliar with this: CAS is a storage model where artifacts are stored and retrieved by the hash of their content, similar in spirit to how Git stores objects. The granularity is impressive, sub-function level, meaning Xcode can skip recompiling individual compilation units if their inputs have not changed. But the remote cache interface is a gRPC protocol with no public SDK. The only way to provide a remote cache is to run a service that speaks this protocol and tell Xcode where to find it via a Unix socket.&lt;/p&gt;

&lt;p&gt;So that is what we did. &lt;code&gt;tuist setup cache&lt;/code&gt; creates a &lt;a href="https://developer.apple.com/library/archive/documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/CreatingLaunchdJobs.html" rel="noopener noreferrer"&gt;LaunchAgent&lt;/a&gt; daemon (a macOS background process managed by the system) that listens on a local socket. You pass the socket path to &lt;code&gt;xcodebuild&lt;/code&gt; via build settings. During compilation, Xcode makes thousands of gRPC calls to this socket, asking "do you have this artifact?" and "store this artifact." Our daemon proxies those calls to our remote infrastructure.&lt;/p&gt;

&lt;p&gt;Gradle's story could not be more different. It has a built-in concept of remote build caching that has been stable for years. You enable it in &lt;code&gt;gradle.properties&lt;/code&gt;, point it at a remote service, and Gradle handles the rest. The protocol is straightforward HTTP. Before executing a task (Gradle's unit of work, like compiling a set of source files or processing resources), Gradle checks the remote cache with a GET request using the task's cache key. If there is a hit, it downloads the artifact and skips execution. After executing a task, it uploads the outputs with a PUT.&lt;/p&gt;

&lt;p&gt;You might wonder why we built a plugin instead of just pointing Gradle at an existing cache server. The reason is that we need control over the client-side logic. Our authentication model is different from what a plain HTTP cache server expects, and we run client-side logic to resolve the lowest latency endpoint from our global cache network. That forced us to implement Gradle's &lt;code&gt;BuildCacheService&lt;/code&gt; interface ourselves, which turned out to be straightforward. We did not have to intercept anything, parse anything, or run a background daemon. We implemented the contract, handled auth and endpoint resolution on our side, and it worked. The plugin is &lt;a href="https://github.com/tuist/tuist/tree/main/gradle" rel="noopener noreferrer"&gt;open source&lt;/a&gt; if you want to see how it all fits together. The cache key computation, the decision of what is cacheable, the artifact packaging, all of that is Gradle's responsibility. We just provide the storage. You can see how this looks on &lt;a href="https://tuist.dev/tuist/android/gradle-cache" rel="noopener noreferrer"&gt;our Android project's cache dashboard&lt;/a&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight kotlin"&gt;&lt;code&gt;&lt;span class="nf"&gt;tuist&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nf"&gt;buildCache&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="n"&gt;push&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;System&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getenv&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"CI"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;!=&lt;/span&gt; &lt;span class="k"&gt;null&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The caching granularity is worth calling out. Gradle caches at the task level: an entire compilation task, a resource processing task, a code generation task. Xcode's compilation cache operates at the compilation unit level, and our module caching operates at the dependency graph level. This means Xcode's approach is more fine-grained but also more latency-sensitive. When your build system makes thousands of cache lookups per build, every millisecond of network latency matters. With Gradle, a large project might have hundreds of cache lookups per build. The tolerance for latency is still much higher.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;We believe caching is a capability that will become increasingly common across build systems. Gradle has had it for years, Xcode added it recently, and others will follow. But caching only works if the infrastructure behind it is fast enough to beat the ceiling of multi-core local compute. If pulling from the cache is slower than just rebuilding, nobody will use it. That is why we are investing in low-latency, globally distributed cache infrastructure that both small teams and large organizations can plug into without having to build or maintain it themselves.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Build insights
&lt;/h2&gt;

&lt;p&gt;The architecture of your project has deep implications in how effectively the build system uses the physical resources available. A poorly structured dependency graph can leave most of your CPU cores idle while one bottleneck module compiles sequentially. A test target that depends on half the project rebuilds far more than it needs to. &lt;strong&gt;But you can only improve what you can measure&lt;/strong&gt;, and most teams have no visibility into how their project interacts with their build system. Build insights exist to change that.&lt;/p&gt;

&lt;p&gt;Xcode gives you no structured way to observe a build as it happens. Instead, after a build finishes, Xcode writes an &lt;code&gt;.xcactivitylog&lt;/code&gt; file to your derived data directory. For Gradle developers: derived data is where Xcode stores all build outputs, indexes, and logs, similar to Gradle's &lt;code&gt;.gradle&lt;/code&gt; and &lt;code&gt;build&lt;/code&gt; directories. The activity log is a binary format that contains timing information, errors, warnings, and file-level compilation data. To extract &lt;a href="https://tuist.dev/en/docs/guides/features/build-insights/xcode" rel="noopener noreferrer"&gt;build insights&lt;/a&gt;, we parse this file after the build using &lt;code&gt;tuist inspect build&lt;/code&gt;, which runs as a scheme post-action (a script Xcode executes after a build or test scheme completes). You can see how this looks on &lt;a href="https://tuist.dev/tuist/tuist/builds" rel="noopener noreferrer"&gt;our own project's build dashboard&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The parsing itself is a pain. The activity log format is not publicly documented. Projects like &lt;a href="https://github.com/MobileNativeFoundation/XCLogParser" rel="noopener noreferrer"&gt;XCLogParser&lt;/a&gt; from the Mobile Native Foundation, which we are now active maintainers of, have done valuable work in this area, but the format changes with new Xcode versions, and every time Apple adds new features to the build system, there is reverse-engineering work needed to parse the new data. Coding agents have made that work easier, but it remains fragile. We extract targets, compiled files with their durations, errors and warnings with file locations, and for Xcode 26 builds, cache hit/miss data for individual compilation units.&lt;/p&gt;

&lt;p&gt;There is also a race condition that caught us off guard. Scheme post-actions run after the build finishes, but you cannot assume the &lt;code&gt;.xcactivitylog&lt;/code&gt; is ready at that point. Xcode generates those artifacts asynchronously, so we had to account for the file not being present when our post-action fires. It is one of those things that works fine in most cases and then fails silently in others.&lt;/p&gt;

&lt;p&gt;Gradle makes this dramatically simpler. When we wanted to give teams visibility into their &lt;a href="https://tuist.dev/en/docs/guides/features/build-insights/gradle" rel="noopener noreferrer"&gt;Gradle builds&lt;/a&gt; (here is &lt;a href="https://tuist.dev/tuist/android/builds" rel="noopener noreferrer"&gt;our Android project's build dashboard&lt;/a&gt;), the plugin API made it almost trivial. We register a listener that gets called as each task finishes. We collect the task path, its outcome (cache hit, executed, failed, skipped), the cache key, artifact size, and duration. At the end of the build, we bundle everything into a JSON payload and send it to our server.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight kotlin"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Gradle calls us. We just collect.&lt;/span&gt;
&lt;span class="k"&gt;override&lt;/span&gt; &lt;span class="k"&gt;fun&lt;/span&gt; &lt;span class="nf"&gt;finished&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;buildOperation&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nc"&gt;BuildOperationDescriptor&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;finishEvent&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nc"&gt;OperationFinishEvent&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;// Record task outcome, duration, cache behavior&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The data is clean because Gradle gives it to us in a structured form. We know exactly what happened to each task and why. &lt;strong&gt;No binary parsing, no race conditions, no reverse engineering.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Test insights, flaky tests, and quarantine
&lt;/h2&gt;

&lt;p&gt;Tests are one of the biggest sources of friction in any development workflow, regardless of platform. A slow test suite delays every pull request. A flaky test, one that passes sometimes and fails other times with the same code, erodes trust in the entire pipeline. And when a flaky test blocks a merge, someone has to investigate whether the failure is real or noise. Multiply that by dozens of developers and hundreds of test runs per day, and the cost adds up fast. &lt;a href="https://tuist.dev/en/docs/guides/features/test-insights/xcode" rel="noopener noreferrer"&gt;Test insights&lt;/a&gt;, &lt;a href="https://tuist.dev/en/docs/guides/features/test-insights/flaky-tests/xcode" rel="noopener noreferrer"&gt;flaky test detection&lt;/a&gt;, and &lt;a href="https://tuist.dev/en/docs/guides/features/test-insights/flaky-tests/xcode#quarantining" rel="noopener noreferrer"&gt;quarantine&lt;/a&gt; exist to give teams the data they need to manage this, and to automate the parts that should not require human attention.&lt;/p&gt;

&lt;p&gt;With Xcode, test results live in &lt;code&gt;.xcresult&lt;/code&gt; bundles. For Gradle developers: these are structured archive files that Xcode produces after a test run, containing test case hierarchies, timing data, failure messages, and attachments like screenshots and crash reports. After the test run, we parse the result bundle using &lt;code&gt;tuist inspect test&lt;/code&gt;, extract the structured data, and upload it. You can see how this looks on &lt;a href="https://tuist.dev/tuist/tuist/tests" rel="noopener noreferrer"&gt;our project's test dashboard&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The result bundle format is richer than what Gradle gives us. It can contain screenshots from UI tests, crash logs, performance metrics. But accessing that richness requires navigating a nested archive format that Apple controls and occasionally changes between Xcode versions.&lt;/p&gt;

&lt;p&gt;Once we have the data, we detect flaky tests by comparing results across runs. If a test passes in one CI run but fails in another on the same commit, we flag it. When a test is identified as flaky, you can quarantine it so it does not block CI while you work on a fix. With Xcode, quarantine works through &lt;code&gt;xcodebuild&lt;/code&gt;'s &lt;code&gt;-skip-testing&lt;/code&gt; flag. When you run &lt;code&gt;tuist test&lt;/code&gt;, we fetch the list of quarantined tests from our server and pass each one as a &lt;code&gt;-skip-testing&lt;/code&gt; argument. If you use &lt;code&gt;xcodebuild&lt;/code&gt; directly, you can get the formatted arguments with &lt;code&gt;tuist test case list --skip-testing&lt;/code&gt;. It works, but it means quarantine is tied to the command-line invocation rather than being embedded in the build system itself.&lt;/p&gt;

&lt;p&gt;In Gradle, we register a &lt;a href="https://docs.gradle.org/current/javadoc/org/gradle/api/tasks/testing/TestListener.html" rel="noopener noreferrer"&gt;&lt;code&gt;TestListener&lt;/code&gt;&lt;/a&gt; on every test task. As each test case finishes, Gradle calls us with the test descriptor (module, suite, name) and the result (pass, fail, skip, duration). We collect everything and upload it when the test task completes. You can see this on &lt;a href="https://tuist.dev/tuist/android/tests" rel="noopener noreferrer"&gt;our Android project's test dashboard&lt;/a&gt;. If teams use the &lt;a href="https://github.com/gradle/test-retry-gradle-plugin" rel="noopener noreferrer"&gt;test-retry plugin&lt;/a&gt; to rerun failed tests, we see each attempt and can detect flakiness by comparing results across retries. For quarantine, our plugin fetches the list of quarantined tests from our server before each test task runs and adds them to Gradle's &lt;code&gt;excludeTestsMatching&lt;/code&gt; filter. The test never runs. No file manipulation, no source control concerns, just a programmatic exclusion at runtime.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight kotlin"&gt;&lt;code&gt;&lt;span class="nf"&gt;tuist&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nf"&gt;testQuarantine&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="n"&gt;enabled&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="k"&gt;true&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The data is simpler than what Xcode gives us, but it is immediately available, stable, and designed for tool integration. The flaky detection and quarantine logic on the server side is identical for both ecosystems. The difference, again, is entirely in how we collect the data and how we act on it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Bundle analysis and previews
&lt;/h2&gt;

&lt;p&gt;Not every feature requires deep integration with the build system. &lt;a href="https://tuist.dev/en/docs/guides/features/bundle-size" rel="noopener noreferrer"&gt;Bundle analysis&lt;/a&gt; and &lt;a href="https://tuist.dev/en/docs/guides/features/previews" rel="noopener noreferrer"&gt;previews&lt;/a&gt; are both CLI features that operate on build artifacts after they are produced. The difference across platforms is just the object types they work with.&lt;/p&gt;

&lt;p&gt;Bundle analysis tracks app size over time. App size tends to grow silently, a new dependency here, an uncompressed asset there, and before you know it your app is 50% larger than it was six months ago. With Xcode, we analyze &lt;code&gt;.ipa&lt;/code&gt; (the archive format for iOS apps), &lt;code&gt;.xcarchive&lt;/code&gt;, and &lt;code&gt;.app&lt;/code&gt; bundles. You can see this on &lt;a href="https://tuist.dev/tuist/tuist/bundles" rel="noopener noreferrer"&gt;our project's bundle dashboard&lt;/a&gt;. With Gradle, we analyze &lt;code&gt;.aab&lt;/code&gt; (Android App Bundle, the format Google Play uses to generate device-specific APKs) and &lt;code&gt;.apk&lt;/code&gt; files. Here is &lt;a href="https://tuist.dev/tuist/android/bundles" rel="noopener noreferrer"&gt;our Android project's bundle dashboard&lt;/a&gt;. In both cases, &lt;code&gt;tuist inspect bundle&lt;/code&gt; breaks down the contents, tracks changes over time, and comments on pull requests with size deltas so the team catches regressions before they ship.&lt;/p&gt;

&lt;p&gt;Previews solve a different problem: getting a build into someone's hands without a full release pipeline. On Apple's side, the alternative is &lt;a href="https://developer.apple.com/testflight/" rel="noopener noreferrer"&gt;TestFlight&lt;/a&gt;, Apple's beta distribution service that requires provisioning profiles, App Store Connect processing, and often a multi-minute wait. On Android's side, it is generating a signed APK and sending it over Slack. With Tuist, you run &lt;code&gt;tuist share&lt;/code&gt; after building, we upload the artifact and give you a link. Anyone with access can run &lt;code&gt;tuist run {url}&lt;/code&gt; to launch it on a simulator or device. We support tracks (like &lt;code&gt;beta&lt;/code&gt; or &lt;code&gt;nightly&lt;/code&gt;), QR codes, and automatic PR comments with preview links.&lt;/p&gt;

&lt;p&gt;Both features required minimal platform-specific work. The CLI handles different file formats, but the server infrastructure for tracking, diffing, sharing, and access control is completely shared between Xcode and Gradle.&lt;/p&gt;

&lt;p&gt;One thing that expanding to Gradle made clear is that our CLI was too coupled to macOS. Gradle projects build on Linux and Windows, not just Mac. So we invested in loosening that dependency, starting with Linux support. We are not fully there yet, Windows is still on the roadmap, but the groundwork is laid. It was one of those changes that the Gradle work forced us to confront earlier than we would have otherwise.&lt;/p&gt;

&lt;h2&gt;
  
  
  From CLI dependency to standalone plugin
&lt;/h2&gt;

&lt;p&gt;With Xcode, all Tuist functionality flows through the CLI. &lt;code&gt;tuist auth login&lt;/code&gt; handles the OAuth flow, stores credentials, and every command from &lt;code&gt;tuist inspect&lt;/code&gt; to &lt;code&gt;tuist setup&lt;/code&gt; uses those stored credentials. The CLI is the central orchestration point because there is no plugin system to embed this logic into.&lt;/p&gt;

&lt;p&gt;When we first built the Gradle plugin, we took the same approach. The plugin shelled out to the CLI for responsibilities like refreshing an OAuth2 session or fetching the cache endpoint with the lowest latency. But it quickly became clear that requiring developers to install the Tuist CLI just to use a Gradle plugin added unnecessary friction. It felt wrong for the Gradle ecosystem, where plugins are expected to be self-contained.&lt;/p&gt;

&lt;p&gt;So we decided to break that dependency. The scope of the logic was well-defined: token management, OAuth2 refresh, endpoint resolution. Coding agents turned out to be great at porting this kind of solution across languages, and since it is a piece of code we do not change often, we re-implemented all of it in Kotlin to run as part of the plugin itself.&lt;/p&gt;

&lt;p&gt;Thanks to that, the plugin is nearly standalone. You add it to &lt;code&gt;settings.gradle.kts&lt;/code&gt;, configure it, and we distribute it through the &lt;a href="https://plugins.gradle.org/plugin/dev.tuist" rel="noopener noreferrer"&gt;Gradle Plugin Portal&lt;/a&gt;, which is exactly where Gradle developers expect to find their tooling. You still need the Tuist CLI for the initial &lt;code&gt;tuist auth login&lt;/code&gt; to authenticate via OAuth, but we are considering shipping an auth task directly in the plugin to make it fully standalone.&lt;/p&gt;

&lt;h2&gt;
  
  
  Looking back
&lt;/h2&gt;

&lt;p&gt;Three weeks from first line of Kotlin to a working plugin with remote caching, build insights, test insights, and flaky test detection. Our Xcode integration took months to reach the same feature set. Part of that is because we were building the infrastructural pieces, the server, the analytics pipeline, the dashboard, that we would later reuse with Gradle. But a large part of the time went into understanding Xcode internals and proprietary formats. Gradle was designed to be extended. Every feature we wanted to build had a corresponding interface or hook point in Gradle's API. We spent our time on our logic, not on figuring out how to extract data from a system that does not want to share it.&lt;/p&gt;

&lt;p&gt;It is empowering to see coding agents lowering the cost of expanding our value to new ecosystems. The work that used to take weeks of reverse engineering now takes days with the right agent and the right context. That changes the calculus of which ecosystems are worth investing in.&lt;/p&gt;

&lt;p&gt;It was also a great exercise in learning how another build system thinks. Understanding Gradle's design decisions, its plugin model, its approach to caching, puts us in a position to cross-pollinate 🐝 ideas between ecosystems. Some patterns from Gradle inform how we approach Xcode tooling, and some of the depth we have built in the Apple ecosystem gives us perspective that Gradle-only teams might lack. &lt;strong&gt;Being in both worlds makes us better at each one.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The Gradle builds and Xcode builds land in the same analytics pipeline. The dashboard shows the same kinds of insights. The flaky test detection uses the same algorithms. That said, we deliberately chose not to unify all data structures or force a common denominator. The data that build toolchains work with is heterogeneous, and trying to flatten Gradle tasks and Xcode compilation units into the same model would lose the nuance that makes the insights useful. But the patterns, the pipelines, the algorithms, those are shared. The toolchain layer is where the ecosystem-specific work happens, and once you get past it, the problems become universal.&lt;/p&gt;

&lt;p&gt;If you are a Gradle developer, the extensibility of your build system is a genuine advantage that you might take for granted. The ecosystem of plugins, the clean lifecycle hooks, the first-class support for remote caching, these are design decisions that make the entire tooling ecosystem richer. If you are an Xcode developer, the lack of extensibility is a real limitation that shapes the tools available to you. Every tool that integrates with Xcode has to work around the same constraints we do. Parsing binary logs, reverse-engineering formats, running daemons as proxies. This is not a criticism of Apple, they have their reasons, but it is a reality that makes the ecosystem harder to improve from the outside.&lt;/p&gt;

&lt;p&gt;For us, the Gradle experience validated our architecture. Our infrastructure is build-system agnostic. The ecosystem-specific work is a plugin, an adapter, that translates between the build system's world and ours. Gradle's adapter was thin and fast to build. Xcode's was thick and took months. But both connect to the same infrastructure, and that is the point. We will keep going deeper into both ecosystems, and if you are interested in trying it out, our &lt;a href="https://plugins.gradle.org/plugin/dev.tuist" rel="noopener noreferrer"&gt;Gradle plugin&lt;/a&gt; and our &lt;a href="https://tuist.dev/en/docs/guides/install-tuist" rel="noopener noreferrer"&gt;Xcode integration&lt;/a&gt; are both available today.&lt;/p&gt;

</description>
      <category>xcode</category>
      <category>gradle</category>
      <category>android</category>
      <category>ios</category>
    </item>
  </channel>
</rss>
