Generating and Browsing the Kernel Rust API Documentation
Rust can turn the comments in a codebase into a browsable website of every type, function and trait, with examples. The kernel builds this for its own Rust interfaces with one command, and also publishes it online. That site is the reference for what a kernel interface expects and what it promises, including the safety conditions you must uphold. Guessing at an interface instead of reading it is where most beginner mistakes start.
Questions this Concept answers
- Why generate this documentation locally rather than only reading the published site?
General Information
This page is the starting point for Rust inside the Linux kernel. It shows how to generate the API documentation from the source you are actually building, so what you read matches the kernel in fron…