Self-Directed Research cover image

Self-Directed Research

I Was Wrong About Rust Build Times

Aug 7, 2024
The host shares a fresh perspective on Rust build times, revealing insights into the Cargo tool's impact. They dive into the competitive landscape of software linkers, discussing Apple's innovations and their repercussions. As they unpack Rust's development complexities, they detail challenges with incremental builds and crate management. The conversation also highlights the nuances of Rust's compiler architectures, comparing incremental and batch compilation. Listeners will discover practical solutions and new tools to enhance Rust project performance.
27:47

Podcast summary created with Snipd AI

Quick takeaways

  • Amos highlights the unexpected increase in Rust build times due to the significant growth in generated code sizes from macros.
  • The discussion emphasizes the need for developers to continuously evaluate their linker choices as Apple enhances its linker performance.

Deep dives

Understanding Rust Build Times

The discussion focuses on the misconceptions around build times in Rust, particularly addressing the impact of generated code. Amos reveals that he previously underestimated the processing times associated with Rust's `cargo` build system, particularly when inspecting generated code sizes. By using tools like `cargo expand`, he discovered that certain macros generated vastly larger code outputs than originally anticipated, with examples illustrating code swelling from 2000 lines to over 54,000 lines after expansion. This insight led to a broader examination of the implications of proc macros on build performance, emphasizing the importance of monitoring generated code volume.

Get the Snipd
podcast app

Unlock the knowledge in podcasts with the podcast player of the future.
App store bannerPlay store banner

AI-powered
podcast player

Listen to all your favourite podcasts with AI-powered features

Discover
highlights

Listen to the best highlights from the podcasts you love and dive into the full episode

Save any
moment

Hear something you like? Tap your headphones to save it with AI-generated key takeaways

Share
& Export

Send highlights to Twitter, WhatsApp or export them to Notion, Readwise & more

AI-powered
podcast player

Listen to all your favourite podcasts with AI-powered features

Discover
highlights

Listen to the best highlights from the podcasts you love and dive into the full episode