liveBook · Manning

No_std program

A no_std Rust crate is configured not to link the standard library by default, relying instead on core and any explicitly selected libraries.

How 2 Manning books explain it

Rust in Action: Systems programming concepts and techniques

no_std is a Rust crate attribute that prevents automatic linkage of the Rust standard library.

How it is used
Uses `#![no_std]` to write a kernel or embedded program without relying on operating-system-provided dynamic memory allocation.
How deep it goes
Explains the attribute’s effect and works through a minimal kernel, including manual panic handling, without detailing standard-library internals.
Examples
Shows a kernel that writes to a framebuffer, plus aborting and infinite-loop panic handlers.
What you can do after
Build it from scratch as a minimal Rust kernel with `#![no_std]`, a custom entry point, and a panic handler.

Read how Rust in Action: Systems programming concepts and techniques explains no_std program →

Learn Rust in a Month of Lunches

The no_std attribute prevents a Rust program from linking the standard library by default.

How it is used
Uses `#![no_std]` to omit the standard library when targeting small devices with limited memory or space.
How deep it goes
Defines the attribute and names unavailable standard-library types, without explaining how to replace them.
Examples
Uses small devices with limited memory or space as the motivating context.
What you can do after
Understand why a Rust program might omit the standard library for a small device.

Read how Learn Rust in a Month of Lunches explains no_std program →

Related concepts

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.