Builds are the new bottleneck
The world is going to need more compute. Agents produce more software, and that software needs to be built and tested. When we started building infrastructure at Tuist , we expected that demand to grow. But teams were already compiling the same dependencies over and over across developer machines and CI. More capacity would help; so would avoiding repeated work. We built shared caching to reuse…
The demand for more computing power is growing as software development continues to expand. At Tuist, the team recognized that teams were compiling the same dependencies repeatedly on developer machines and in Continuous Integration (CI) processes. To address this issue, they developed shared caching and remote execution services to reuse results and distribute work more efficiently. However, these services required support from build tools, which many projects and automation tools did not yet have.
In response, the team created Struo, a solution that connects existing projects and automation tools to the new infrastructure without forcing teams to change their existing workflows. Struo reads the definitions used by a project's toolchain, such as Cargo.toml or an Xcode project, and derives a build graph from them. The team keeps their existing manifests and workflows, allowing caching and remote execution to work seamlessly underneath.
Struo functions as a "narrow waist" between projects and infrastructure, providing a common interface to caching and execution without prescribing how teams organize their work. This allows Struo to work with existing projects and internal automation tools alike. The team has already integrated with multiple providers for caching and remote execution, and continues to add more options.
Adopting Struo is simple and can be done incrementally. For example, a script can be created to use Struo for a specific task, such as running tests using Vitest. This script tells Struo what inputs and outputs to use and where to run the command. Once the script is set up, it can be run as usual, with Struo either retrieving a cached result or executing the script remotely and returning the results.
Struo works with various native projects, including Cargo, Xcode, Swift packages, Mix, and Nx, without requiring any additional build files or initialization steps. For supported native projects, Struo reads the existing definitions and derives the build graph. When connected to a remote cache provider, the same commands can share results with teammates and CI systems, improving overall efficiency.
For teams that need more control over the build graph, Struo offers the option to define it using Starlark. This allows for optimizations like graph loading and connecting components written in different languages. By defining targets and dependencies in struo.toml and specifying how to build them using Starlark, teams can customize their build process while still benefiting from Struo's caching and execution capabilities.
As organizations continue to build their own systems to handle the increasing demands of software development, Struo aims to provide a flexible and efficient solution for teams looking to leverage remote caching and execution. With its compatibility with existing projects and workflows, Struo offers an accessible and cost-effective way to optimize compute usage and improve overall development processes.
Rewritten by urgent.news; may contain errors — check the original.
Source: dev.to