Master the fundamental concepts of rust for systems programming through this focused micro-challenge.
#![no_std] drops the standard library and keeps core: Option, Result, iterators, but no Vec, files, threads, or networking unless you add alloc yourself. Embassy, Oreboot, and Rust-for-Linux all live here.
rustLoading…
#[no_main]: you supply _start or a board-specific entry#[global_allocator]: only if you pull in alloc for Box/Veccore works on bare metal; std layers OS syscalls, I/O, and synchronization. Cross-compile with --target x86_64-unknown-none or a board JSON when libc is absent.
For this exercise, you will build a minimal no_std binary with a custom entry and panic handler. This task asks you to explain what disappeared compared to cargo new, because every embedded bug that "works in std" traces back to missing runtime support.
Keep the relevant man page, ABI doc, or Rust reference chapter open while you work. When your output disagrees with the reference implementation on the same machine, the mismatch is usually an alignment rule, an off-by-one terminator, or a register slot you misread in GDB. Skim the official documentation for the tool or ABI named in the exercise; the prose changes, but register roles, syscall numbers, and ownership rules stay stable across releases. Treat each failure as a contract test: the CPU, kernel, and borrow checker enforce rules whether or not the tutorial mentioned them explicitly.
Write a no-std Rust program that runs without the standard library.
Requirements:
Three hints are available for this task, revealed one at a time inside the code workspace so you can struggle productively before seeing them.
All starter code and reference implementations are available for your local setup.
View on Github