Marcelo Almeida, Grant Cole, Ke Du, Gongming Luo, Shulin Pan, Yu Pan, Kai Qiu, Vishnu Reddy, Haochen Zhang, Yingying Zhu, Cyrus Omar
{"title":"RustViz: Interactively Visualizing Ownership and Borrowing","authors":"Marcelo Almeida, Grant Cole, Ke Du, Gongming Luo, Shulin Pan, Yu Pan, Kai Qiu, Vishnu Reddy, Haochen Zhang, Yingying Zhu, Cyrus Omar","doi":"10.1109/vl/hcc53370.2022.9833121","DOIUrl":null,"url":null,"abstract":"—Rust is an industrial systems programming language unique in achieving memory safety without the need for a garbage collector. Instead, Rust relies on a unique and sometimes subtle resource ownership and borrowing system. This system can make learning Rust a challenge, even for experienced pro- grammers. Motivated by these challenges, we introduce RustViz, a tool that allows an instructor to generate custom interactive timelines depicting ownership and borrowing events alongside Rust code examples embedded within learning material. These visualizations makes visible the static events, and subsequent state changes, that a Rust programmer must otherwise track entirely mentally. We have used RustViz to build a week-long Rust unit in a large undergraduate programming languages course. We demonstrate that this learning material, and the RustViz visualizations in particular, were valuable to students and led to the development of an accurate mental model of the essentials of ownership and borrowing in Rust.","PeriodicalId":351709,"journal":{"name":"2022 IEEE Symposium on Visual Languages and Human-Centric Computing (VL/HCC)","volume":"88 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2022-09-12","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"2022 IEEE Symposium on Visual Languages and Human-Centric Computing (VL/HCC)","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/vl/hcc53370.2022.9833121","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0
Abstract
—Rust is an industrial systems programming language unique in achieving memory safety without the need for a garbage collector. Instead, Rust relies on a unique and sometimes subtle resource ownership and borrowing system. This system can make learning Rust a challenge, even for experienced pro- grammers. Motivated by these challenges, we introduce RustViz, a tool that allows an instructor to generate custom interactive timelines depicting ownership and borrowing events alongside Rust code examples embedded within learning material. These visualizations makes visible the static events, and subsequent state changes, that a Rust programmer must otherwise track entirely mentally. We have used RustViz to build a week-long Rust unit in a large undergraduate programming languages course. We demonstrate that this learning material, and the RustViz visualizations in particular, were valuable to students and led to the development of an accurate mental model of the essentials of ownership and borrowing in Rust.