liveBook · Manning

Println! macro

The println! macro is an output operation that formats arguments and writes the resulting text followed by a line terminator to standard output.

How 2 Manning books explain it

Learn Rust in a Month of Lunches

The println! macro formats its arguments and writes the resulting text followed by a newline to standard output.

How it is used
Uses `println!` to print text and formatted values, followed by a newline.
How deep it goes
Works from basic placeholders through Debug, escapes and formatting options, without explaining macro internals.
Examples
Shows a greeting with an inserted number, a Display compiler error, and examples of number bases and aligned output.
What you can do after
Apply it in Rust to print formatted values and use compiler feedback to choose a supported placeholder.

Read how Learn Rust in a Month of Lunches explains println! macro →

Rust in Action: Systems programming concepts and techniques

println! is Rust's standard macro for printing formatted output followed by a newline.

How it is used
Prints fixed or formatted values to the console while introducing Rust’s macro syntax.
How deep it goes
Explains macro notation, stdout, placeholders, and type handling, but treats macros as function-like rather than exposing expansion internals.
Examples
Demonstrates greetings in three languages, iterated strings, formatted placeholders, and CSV-processing output.
What you can do after
Apply it via Rust syntax to print messages and formatted values during small programs and data-processing tasks.

Read how Rust in Action: Systems programming concepts and techniques explains println! macro →

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.