Conceptual
Login

Ownership Checks Happen at Compile Time

All of Rust's ownership, borrowing and lifetime checking is done by the compiler before any code runs; none of it survives into the finished program. A move of a value is a bookkeeping decision in the type system, not extra work for the processor. That is why safety rules that would be too slow to check at run time are affordable inside an operating system kernel.

Questions this Concept answers

  • Why does compile-time checking matter so much for the kernel's acceptance of Rust?