An embedded execution environment is the support available while firmware runs. Unlike desktop Rust, bare-metal code may have no operating system or standard-library runtime; it commonly uses `no_std`, `core`, and static allocation. section 2.1.1 section 1.3.1
Without an operating system or external loader, startup must prepare memory before transferring control to the application. The reset handler performs this setup and conventionally never returns. section 4.3 section 4.4
Table 1.1 Desktop Rust versus Embedded Rust applications
| Feature | Desktop Rust (std-based) | Embedded Rust (no_std) |
Runtime Environment |
Rich runtime support provided by an OS (Linux, Windows, macOS). |
Minimal runtime environment provided by the programmer or specialized crates (e.g., |
Standard Library |
Full access to |
Restricted to |
Memory Management |
Automatic memory layout managed by the OS; heap is globally available. |
Requires explicit memory layout defined by a custom linker script ( |
Startup Process |
OS loads the program and executes the standard |
The developer must define a custom entry point ( |
I/O and Peripherals |
Relies on OS APIs for I/O (sockets, files). |
Requires direct access to memory-mapped registers (MMIO) and hardware abstraction layers (HALs). |
Compare hosted Rust’s OS-provided support with the runtime, memory, and startup responsibilities of embedded Rust. section 2.1.1 section 1.3.1
Use fixed-capacity storage
A `no_std` program without an allocator cannot use a heap-backed `Vec`; a fixed-size array provides storage without heap allocation. section 1.3.1




