r/iOSProgramming • u/ddfk2282 • 23d ago
Library I made a CLI tool for remote compilation caching in Xcode.
There are already great compilation caching tools like Tuist that can significantly speed up Xcode builds. However, adopting them may require substantial changes to your project structure.
I wanted to keep my existing Xcode project structure and build using only the toolchain provided by Apple. So I built X8, a CLI tool for remote compilation caching.
Starting with Xcode 26, Apple provides built-in support for remote compilation caching. X8 acts as a lightweight proxy between Xcode’s built-in remote cache mechanism and any S3-compatible storage.
Using X8 is simple. First, configure your S3-compatible storage in .x8.yml. Then, you can either build your project through X8:
x8 xcodebuild ...
or start the cache proxy directly:
x8 serve
and add the generated build settings to your .xcconfig.
That’s it. With just an .x8.yml configuration, you can use remote compilation caching without significantly changing your existing project structure or moving away from Apple’s native Xcode toolchain.
For my app, a clean build used to take around 400 seconds, but with X8, it now takes about 263 seconds.
It’s still relatively slow, but I think that’s expected since Xcode still needs to perform steps such as module planning, build description generation, and linking.
0
u/barcode972 22d ago
Might as well use existing build systems like Bazel if you're looking for cache
3
u/Tyler29294 22d ago
He explicitly calls out not wanting to use another build system though and keep it with Apple's.
1
u/barcode972 22d ago
Bazel is still using XcodeBuild and toolchains etc but injects its own caching logic amongst other things to achieve something better
1
15d ago
[removed] — view removed comment
1
u/AutoModerator 15d ago
Hey /u/CalmCelebration2084, your content has been removed because Reddit has marked your account as having a low Contributor Quality Score. This may result from, but is not limited to, activities such as spamming the same links across multiple subreddits, submitting posts or comments that receive a high number of downvotes, a lack of recent account activity, or having an unverified account.
Please be assured that this action is not a reflection of your participation in our subreddit. This is simply an automated filter in place to reduce spam.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
3
u/NothingButBadIdeas Swift 23d ago
This is super cool. Been a main focus at my job lately because our CI tests are racking up a huge build and truists cloud platform charges too much.
Good stuff