The Pragmatic Engineer

Why Rust is different, with Alice Ryhl

· Summarized

Share this episode
Anyone with this link can open it.
Share Link
Start at 0:00

Key takeaways

  • Rust’s unique combination of safety, performance, and modern language features makes it ideal for high-performance and security-critical applications.
  • Memory safety and ownership concepts are central to Rust’s ability to prevent bugs found in languages like C++ — with tools like the borrow checker enforcing rules at compile time.
  • Unsafe Rust provides a controlled escape hatch for performance-critical or low-level operations, but must be used with care to preserve safety guarantees.
  • Rust’s development process relies on transparent RFCs, community consensus, and editions that enable evolution without breaking existing code.
  • Rust is increasingly adopted in mainstream systems, including the Linux kernel, thanks to its reliability and safety features.
  • AI tools are becoming useful in Rust development for code generation, testing, and review, although understanding fundamental concepts remains essential.
  • Getting involved in the Rust ecosystem can start with community resources like the official book, tutorials, and contributing to open-source projects.

Summary

Introduction to Rust and the Episode's Focus

This episode of The Pragmatic Engineer Podcast features Alice Ryhl, a software engineer on Google’s Android Rust team, and a core maintainer of Tokio. The discussion centers around what makes Rust unique among programming languages, its safety and performance features, governance model, ecosystem, and real-world applications such as its integration into the Linux kernel. The episode also explores how developers from various backgrounds can adopt Rust and the future potential of the language.

Rust's Ecosystem and Tokio Runtime

Alice explains Tokio as a foundational async runtime for Rust that is comparable to JavaScript's event loop but with multi-threading capabilities. She emphasizes Rust’s appeal due to the principle 'when it compiles, it works,' highlighting the importance of strong type systems, null safety, and error handling. The conversation discusses Rust’s prominence and rapid growth, as evidenced by its overtaking PHP and Go in usage indexes, and its expanding adoption in high-performance systems and the Linux kernel.

Core Features and Safety in Rust

The host and Alice delve into Rust’s memory safety mechanisms, ownership model, borrowing, and the borrow checker, illustrating how these features prevent common bugs such as use-after-free and null dereferences. Alice points out the role of unsafe Rust as an escape hatch for performance-critical code, but stresses that unsafe code must adhere to strict rules to avoid safety violations. Memory safety’s significance for security vulnerabilities is linked to Rust’s reliability in critical software.

Rust's Language Design and Decision-Making Processes

The podcast explores how Rust's development is driven through a transparent RFC process, where features undergo rigorous discussion, design, and community feedback before stabilization. The governance model involves self-organizing teams rather than a benevolent dictator, and decisions are made collectively and through formal review periods. The process ensures high-quality, community-vetted language evolution.

Language Evolution: Editions and Versions

Rust introduces editions as a way to handle breaking changes, allowing coexistence of code written in different iterations of the language without disrupting existing projects. This system enables innovation while maintaining backward compatibility, with new features like async/await being introduced in later editions.

Contributing and Funding in Rust Culture

Alice discusses opportunities for contributing to Rust—ranging from fixing bugs, adding features, to participating in RFCs—and mentions that many contributors are supported by their employers. The Rust Foundation also offers grants, especially targeting students and new contributors, fostering a vibrant community of both volunteer and funded developers.

Rust in the Linux Kernel and Broader Adoption

The conversation highlights Rust’s growing role in the Linux kernel, where it’s moved from experimental to officially supported status. The Linux community’s shifting attitude toward Rust is portrayed as increasingly positive, recognizing Rust’s memory safety and security benefits. Alice shares insights into regulatory pressures for memory safety in critical systems and the potential for Rust to replace unsafe languages like C++ in sensitive environments.

AI Tools and Future of Rust Development

Alice shares her experiences with AI assisting in coding tasks, such as generating code snippets and automating tests, emphasizing that AI can help reduce toil and improve safety in critical codebases. The discussion anticipates AI’s role in enhancing code review, edge case detection, and overall software quality, particularly in safety-critical systems like the Linux kernel.

Learning Rust and Resources for Developers

The episode concludes with advice for newcomers: starting with the official Rust book, practicing by building projects, and engaging with community tools like rustlings. Alice warns about the potential for AI to create a false sense of mastery, stressing the importance of understanding core concepts such as ownership, borrowing, and unsafe code. She shares her enthusiasm for ongoing language features and upcoming enhancements.

Sponsors

  • Antithesis · Verify your system's correctness without human review or traditional integration tests and avoid bugs or outages.
  • Sentry · Application monitoring software that provides full context on issues, stack traces, user actions, environment details, and real-time debugging capabilities. Supports a wide range of tech stacks including TypeScript, JavaScript, Python, Go, and more.
  • Craft Conference · Join industry experts like Gergely, Kent Beck, and Hillel Wayne at the conference dedicated to the art and science of software delivery craft.

Show notes

Brought to You By:

• Antithesis – verify your system’s correctness without human review or traditional integration tests – and avoid bugs or outages.

• Sentry⁠ – application monitoring software considered “not bad” by millions of developers

• ⁠Craft Conference⁠: join Gergely, Kent Beck, Hillel Wayne and others at the conference dedicated to the art and science of software delivery craft.

—

Rust is one of the most admired programming languages around – and also one of the hardest to learn. What makes developers stick with it?

In this episode of The Pragmatic Engineer Podcast, I sit down with Alice Ryhl, a software engineer on Google’s Android Rust team, and a core maintainer of Tokio, which is the most widely-used async runtime in Rust.

We discuss what makes Rust different from other languages like TypeScript, Go, and C++, and why so many developers say that “once it compiles, it works.” We go deep into memory safety, ownership, borrowing, unsafe Rust, and Cargo.

We also cover how Rust is governed by RFCs, feature flags, its six-week release cycle, how engineers get paid to work on the language, and also look into how Rust’s use inside the Linux kernel is progressing.

—

Timestamps

(00:00) Intro

(04:09) Tokio: an overview

(05:11) What Alice likes about Rust

(12:48) Rust for TypeScript engineers

(13:51) Moving from C++ to Rust

(14:34) Memory safety

(18:12) Garbage collection tradeoffs

(21:46) Ownership, references, and borrowing

(26:59) Unsafe in Rust

(31:21) Crates and Cargo

(35:55) Language design and RFCs

(43:02) Building new features

(46:30) Editions vs. versions

(49:47) Getting paid to work on Rust

(51:27) Contributing to Rust

(53:03) Rust in the Linux kernel

(55:45) AI use cases for Rust

(1:01:35) Learning Rust

(1:03:54) Book recommendation

—

The Pragmatic Engineer deepdives relevant for this episode:

• The past and future of modern backend practices

• How Kotlin was built with Andrey Breslav

• How Swift was built with Chris Lattner

• How Linux is built with Greg KH

—

Production and marketing by ⁠⁠⁠⁠⁠⁠⁠⁠https://penname.co/⁠⁠⁠⁠⁠⁠⁠⁠. For inquiries about sponsoring the podcast, email podcast@pragmaticengineer.com.



Get full access to The Pragmatic Engineer at newsletter.pragmaticengineer.com/subscribe

Follow this show on AudioBrevity and new episodes get summarized for you. Create a free account

Couldn't load the audio. A blocker may be stopping the show's tracking links. Open the file