liveBook · Manning

No_std program

As explained in Learn Rust in a Month of Lunches

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

`#![no_std]` tells Rust not to bring in the standard library, so standard-library types such as `Vec` and `String` are unavailable. This can suit small devices with limited memory or space, where code may use the stack rather than the heap. section 13.1.5

How Learn Rust in a Month of Lunches covers it

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.
How it connects
Connects the standard library and its `Vec` and `String` types with stack and heap use.

Also explained in

Compare how 2 books explain no_std program →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Learn Rust in a Month of Lunches. The section links point to the parts of the book it draws on.