In this talk, Will Crichton from Brown University presents four years of research on creating evidence-based, human-centered tools to make the Rust programming language more accessible to both novices and experts. The core challenge addressed is Rust's complexity, which combines systems and functional programming paradigms, creating a steep learning curve. The talk introduces three open-source tools designed to mitigate this complexity without sacrificing the language's power. The first tool, Aquascope, offers an interactive visualization of Rust's ownership system using a "permissions model" (read/write/own) to provide a more constructive learning experience than traditional rule-based explanations. The second, Argus, is a graphical debugger for Rust's "traits," transforming long, unreadable compiler errors into navigable inference trees. The third, Flowistry, is a program slicer that uses Rust's unique type system to automatically highlight code relevant to a specific variable, helping developers focus on what matters in complex functions.
Making Rust Accessible: A Breakdown of Evidence-Based Developer Tools
0:36 The Challenge of Rust: Rust's power comes from combining the efficiency of systems programming (like C++) with the expressive abstractions of functional programming (like OCaml). However, this duality creates a steep learning curve, which is a significant barrier to adoption.
3:04 A Scientific Approach to Developer Tools: The research goal is not just to make Rust easier but to empower users by creating tools based on human-centered design principles and formal theories of cognition.
4:26 Tool 1: Visualizing Ownership (Aquascope): This tool addresses the difficulty of learning Rust's core feature, ownership, which guarantees memory safety.
Problem (7:47): Traditional teaching methods explain ownership through a set of "you can't do this" rules, which is an ad-hoc approach that fails to build a deep, constructive mental model.
Solution (9:14): Aquascope introduces the "permissions model," which visualizes how variables have read, write, and own permissions. The tool provides interactive diagrams showing how these permissions change line-by-line as the code borrows and moves data.
Evaluation (15:55): When this new pedagogy was integrated into a fork of "The Rust Book," it improved learners' quiz scores by an average of 9 percentage points.
17:43 Tool 2: A Trait Debugger (Argus): This tool is designed to help developers debug complex compiler errors related to Rust's "traits" (similar to interfaces or type classes).
Problem (22:01): As code dependencies grow, trait-related error messages can become incredibly long and difficult to decipher, sometimes spanning hundreds of lines and even being written to separate text files.
Solution (23:27): Argus is a graphical tool that visualizes the compiler's trait inference process as an interactive tree. This allows developers to explore the error's origin without being overwhelmed by a wall of text, offering different views (top-down, bottom-up) to quickly pinpoint the problem.
Evaluation (32:08): In a user study, developers using Argus were able to localize the root cause of an error approximately three times faster than those using only the compiler's text-based diagnostics.
32:47 Tool 3: Program Slicing (Flowistry): This tool helps developers understand complex functions by filtering out irrelevant code.
Problem (33:01): When trying to understand how a specific variable is calculated or used, developers often have to manually read through a large amount of unrelated code.
Solution (34:36): Flowistry provides a "focus mode" that, upon clicking a variable, automatically fades out all code that does not influence it (a "backward slice") or is not influenced by it (a "forward slice").
Key Insight (39:00): This analysis is uniquely powerful in Rust because the language's ownership types (lifetimes and mutability) provide crucial information about aliasing and mutation. This allows the tool to work precisely even with pre-compiled "black box" functions.
44:38 Reflections on the Future of Programming Tools: The talk concludes by advocating for tools that augment rather than automate programmers, highlighting the ongoing importance of cognitive science in creating effective human-computer interfaces, and emphasizing the need for more tools designed specifically for learners.