A runtime crate supplies target-specific startup and exception-handling support for bare-metal Rust firmware, where there is no operating system or standard library. section 1.3 section 2.1.1
On common targets, runtime crates handle essential startup tasks:
- Place the vector table and set the initial stack pointer. section 1.3.3
- Copy initialized data into .data and zero .bss before transferring control to the entry function. section 1.3.3
- Register interrupt and exception handlers, with defaults that applications can override. section 1.3.3
The common choices are cortex-m-rt for Cortex-M and riscv-rt for RISC-V. They reduce startup boilerplate; projects with unusual needs can use extension points for linker scripts, vector placement, early initialization hooks, or panic behavior. section 1.3.3 section 4.4.7
