HackerPapers

arXiv:1903.00982cs.PL

Oxide: The Essence of Rust

Aaron Weiss, Olek Gierczak, Daniel Patterson, Amal Ahmed

Abstract

Rust claims to advance industrial programming by bridging the gap between low-level systems programming and high-level application programming. At the heart of the argument that this enables programmers to build more reliable and efficient software is the borrow checker - a novel approach to ownership that aims to balance type system expressivity with usability. And yet, to date there is no core type system that captures Rust's notion of ownership and borrowing, and hence no foundation for research on Rust to build upon. In this work, we set out to capture the essence of this model of ownership by developing a type systems account of Rust's borrow checker. We present Oxide, a formalized programming language close to source-level Rust (but with fully-annotated types). This presentation takes a new view of lifetimes as an approximation of the provenances of references, and our type system is able to automatically compute this information through a substructural typing judgment. We provide the first syntactic proof of type safety for borrow checking using progress and preservation. Oxide is a simpler formulation of borrow checking - including recent features such as non-lexical lifetimes - that we hope researchers will be able to use as the basis for work on Rust.

arXiv comments
Latest draft
Journal reference
DOI
Subjects
cs.PLProgramming Languages

On Hacker News

Linked by 2 identifiable commenters in 3 comments across 3 threads, from Mar 2019 to Nov 2021. Found in 2 HN submissions from Mar 2019 to May 2021. Open submission discussions.

Comments linking this paper, per year.

Discussed in comments3 threads

    • The shallowness of rusts correctness has pretty much killed my interest in it. Much of its purported virtue seems to be mostly lore and myth, and doesn't keep its promises under close inspection and scrutiny. For example the "Rustonomicon" is only half finished and doesn't have…

      j-pbView on HNParent context

    • When you push a package to crates.io, docs.rs will do a static analysis of this package and its dependencies and try its best to create meaningful links between the traits and implementing types. The issue is that it is quite common to have trait definitions in one create being…

      j-pbView on HNParent context

  1. [dead] 1 comment

Submitted to Hacker News

Connected through shared HN threads, not inferred similarity or a recommendation.