Webinars

Insights from the best projects and people

All Webinars

Rust for Linux: Code Documentation & Tests

Date: Apr 20, 20229:00 - 10:30AM PDT (UTC-7) LF Live Mentorship Series Download Slides

Join us for Rust for Linux: Code Documentation & Tests, with Miguel Ojeda, Rust for Linux Maintainer.

Rust for Linux aims to bring a new system programming language into the kernel. Rust has a key property that makes it very interesting to consider as the second language in the kernel: it guarantees no undefined behavior takes place (as long as unsafe code is sound). This includes no use after-free mistakes, no double frees, no data races, etc.

An important part of using, writing and reviewing safe and unsafe code consists in accurately describing the safety contracts and invariants of functions and types, as well as the justifications of the correctness of unsafe blocks. A portion of this talk will focus on how we are writing those within the project, as well as a general look at the documentation, coding guidelines, etc.

Furthermore, in Rust, examples are part of the documentation and double as tests. The session will take a brief look into writing documentation tests as well as testing in general. No prerequisite Rust knowledge is needed to follow the session.