Lune

ICSE2022Top-tier venue

Learning and Programming Challenges of Rust: A Mixed-Methods Study

Shuofei Zhu, Ziyi Zhang, Boqin Qin, Aiping Xiong, Linhai Song

Abstract

Rust is a young systems programming language designed to provide both the safety guarantees of high-level languages and the execution performance of low-level languages. To achieve this design goal, Rust provides a suite of safety rules and checks against those rules at the compile time to eliminate many memory-safety and thread-safety issues. Due to its safety and performance, Rust's popularity has increased significantly in recent years, and it has already been adopted to build many safety-critical software systems. It is critical to understand the learning and programming challenges imposed by Rust's safety rules. For this purpose, we first conducted an empirical study through close, manual inspection of 100 Rust-related Stack Overflow questions. We sought to understand ( 1 ) what safety rules are challenging to learn and program with, (2) under which contexts a safety rule becomes more difficult to apply, and (3) whether the Rust compiler is sufficiently helpful in debugging safety-rule violations. We then performed an online survey with 101 Rust programmers to validate the findings of the empirical study. We invited participants to evaluate program variants that differ from each other, either in terms of violated safety rules or the code constructs involved in the violation, and compared the participants' performance on the variants. Our mixed-methods investigation revealed a range of consistent findings that can benefit Rust learners, practitioners, and language designers.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

16 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • An Empirical Study of Rust-for-Linux: The Success, Dissatisfaction, and Compromise cites Understanding memory and thread safety practices and issues in real-world Rust programs
  • An Empirical Study of Rust-for-Linux: The Success, Dissatisfaction, and Compromise cites How do programmers use unsafe rust?
  • How do programmers use unsafe rust? cites Understanding memory and thread safety practices and issues in real-world Rust programs
  • RPG: Rust Library Fuzzing with Pool-based Fuzz Target Generation and Generic Support cites Understanding memory and thread safety practices and issues in real-world Rust programs
  • Is unsafe an Achilles' Heel? A Comprehensive Study of Safety Requirements in Unsafe Rust Programming cites Understanding memory and thread safety practices and issues in real-world Rust programs
  • Rust for Embedded Systems: Current State and Open Problems cites Understanding memory and thread safety practices and issues in real-world Rust programs
  • Rust for Embedded Systems: Current State and Open Problems cites How do programmers use unsafe rust?
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers16

  1. An Empirical Study of Rust-for-Linux: The Success, Dissatisfaction, and CompromiseHongyu Li, Liwei Guo, Yexuan Yang, Shangguang Wang et al.USENIX ATC 2024 · 29 citations
  2. A Grounded Conceptual Model for Ownership Types in RustWill Crichton, Gavin Gray, Shriram KrishnamurthiOOPSLA 2023 · 25 citations
  3. Is unsafe an Achilles' Heel? A Comprehensive Study of Safety Requirements in Unsafe Rust ProgrammingMohan Cui, Shuran Sun, Hui Xu, Yangfan ZhouICSE 2024 · 12 citations
  4. Rust for Embedded Systems: Current State and Open ProblemsAyushi Sharma, Shashank Sharma, Sai Ritvik Tanksalkar, Santiago Torres-Arias et al.CCS 2024 · 12 citations
  5. RPG: Rust Library Fuzzing with Pool-based Fuzz Target Generation and Generic SupportZhiwu Xu, Bohao Wu, Cheng Wen, Bin Zhang et al.ICSE 2024 · 9 citations

Builds on7

  1. Taxonomy of real faults in deep learning systemsNargiz Humbatova, Gunel Jahangirova, Gabriele Bavota, Vincenzo Riccio et al.ICSE 2020 · 281 citations
  2. Understanding memory and thread safety practices and issues in real-world Rust programsBoqin Qin, Yilun Chen, Zeming Yu, Linhai Song et al.PLDI 2020 · 112 citations
  3. Understanding Privacy-Related Questions on Stack OverflowMohammad Tahaei, Kami Vaniea, Naomi SaphraCHI 2020 · 93 citations
  4. How do programmers use unsafe rust?Vytautas Astrauskas, Christoph Matheja, Federico Poli, Peter Müller et al.OOPSLA 2020 · 78 citations
  5. An empirical study on challenges of application development in serverless computingJinfeng Wen, Zhenpeng Chen, Yi Liu, Yiling Lou et al.FSE 2021 · 75 citations

Related papers

  1. Is rust used safely by software developers?Ana Nora Evans, Bradford Campbell, Mary Lou SoffaICSE 2020 · 57 citations
  2. Translating C to safer RustMehmet Emre, Ryan Schroeder, Kyle Dewey, Ben HardekopfOOPSLA 2021 · 60 citations
  3. Rust-lancet: Automated Ownership-Rule-Violation Fixing with Behavior PreservationWenzhang Yang, Linhai Song, Yinxing XueICSE 2024 · 6 citations
  4. Aliasing Limits on Translating C to Safe RustMehmet Emre, Peter Boyland, Aesha Parekh, Ryan Schroeder et al.OOPSLA 2023 · 32 citations
  5. "I wouldn't want my unsafe code to run my pacemaker": An Interview Study on the Use, Comprehension, and Perceived Risks of Unsafe RustSandra Höltervennhoff, Philip Klostermeyer, Noah Wöhler, Yasemin Acar et al.USENIX Security 2023
Dusk over the sea between two cliffs drawn in fine vertical lines