Home / Companies / Earthly / Blog / Post Details
Content Deep Dive

Incremental Rust builds in CI

Blog post from Earthly

Post Details
Company
Date Published
Author
Ignacio del Valle Alles
Word Count
3,099
Language
English
Hacker News Points
-
Summary

The blog post discusses the development of lib/rust, an open-source Earthly library created in collaboration with the ExpressVPN core team, designed to optimize Rust build performance in continuous integration (CI) environments. By leveraging persistent build runners and cache mounts, lib/rust aims to replicate the efficiency of local builds, significantly reducing build times, as demonstrated by ExpressVPN's experiences where build times decreased from 22.5 minutes to 2.5 minutes. The library offers a cleaner and more readable build logic through Earthly, a tool that combines Dockerfile syntax with containerized builds, allowing for seamless integration with CI providers. The post also explores various strategies and tools, such as cargo-chef and sccache, for improving Rust CI builds, while emphasizing the benefits of using persistent remote runners for effective cache management. The introduction of these techniques has led to substantial performance improvements in several Rust projects at ExpressVPN, showcasing the potential of leveraging caching and persistent build runners for faster CI builds.