Usage Commands Cloud Contributors

Caching dependencies

Tuist has support for caching a pre-compiled version of your project targets locally and remotely. When targets are cached, developers can generate projects where the targets they don’t plan to work on are replaced with their pre-compiled version. In modular apps, this feature yields significant improvements in build times.

Unlike Bazel or Buck that replace Xcode’s build system to cache individual build steps, we do caching at the module level. That means developers can use Xcode and its build system and don’t have to develop tooling around alternative build systems to integrate them with developers tooling.

An image that shows how the caching feature works

Warming the cache

Warming the cache is the process of building, hashing, and storing cacheable targets in the cache. We recommend setting up a continuous integration pipeline that runs on every master commit and executes the following command:

tuist cache warm
Copy the content

Focusing on a project

Once the cache has been warmed with the pre-compiled targets, we can tell Tuist that we want to focus on a particular project and get the dependencies from the cache. All we need to do is run the following command:

tuist focus --cache
Copy the content

Debugging

Targets are uniquely identified in the cache. The identifier (hash) is obtained by hashing the attributes of the target, its project, the environment (e.g. Tuist version) and the hashes of its dependencies. To facilitate debugging, Tuist exposes a command that prints the hash of every target of the dependency tree:

tuist cache print-hashes
Copy the content

By using this website, you agree to our cookie policy.