liveBook · Manning

Cargo.toml

Cargo.toml is a TOML-formatted Rust package manifest declaring project metadata, dependencies, targets, and build configuration.

How 4 Manning books explain it

Code Like a Pro in Rust

Cargo.toml is a project manifest and configuration file that specifies metadata and dependencies for a Cargo project.

How it is used
Configures Cargo projects through package metadata, dependency declarations, workspace settings, and build dependencies.
How deep it goes
Works through concrete manifest entries and Cargo commands, without providing an exhaustive TOML or manifest reference.
Examples
Shows a minimal manifest with rand, a path-based workspace dependency, C build dependencies, and a registry patch.
What you can do after
Operate/configure it to add crates, organize workspace members, supply build dependencies, and temporarily replace upstream dependencies.

Read how Code Like a Pro in Rust explains cargo.toml →

Rust Servers, Services, and Apps

Cargo.toml is a manifest file that declares a Rust package's metadata, dependencies, targets, and related Cargo configuration.

How it is used
Organizes Rust workspaces, selects project dependencies, and declares executable targets for web services and database applications.
How deep it goes
Defines workspace membership, dependencies, feature flags, and binaries through concrete listings, but does not detail manifest syntax broadly.
Examples
Uses tutor-nodb and tutor-db workspaces, basic-server binaries, and manifests for Actix Web registration and sqlx database programs.
What you can do after
Operate/configure Cargo projects by adding dependencies, selecting features, declaring binaries, and running workspace packages.

Read how Rust Servers, Services, and Apps explains cargo.toml →

Learn Rust in a Month of Lunches

Cargo.toml is the manifest file that declares a Rust package's metadata and dependencies, including external crates and their versions.

How it is used
Uses the manifest to declare package details, add external crates, and set release-mode panic behavior.
How deep it goes
Walks through adding a dependency and running the project, then gives a brief release-profile setting; does not detail manifest rules.
Examples
Shows a manifest with rand = "0.8.5", Cargo output compiling its dependencies, and a release profile using panic = 'abort'.
What you can do after
Operate/configure it by adding a crate under [dependencies] and using cargo run to build and run with that crate.

Read how Learn Rust in a Month of Lunches explains cargo.toml →

Rust in Action: Systems programming concepts and techniques

Cargo.toml is a Rust package manifest that declares project metadata and dependencies.

How it is used
Coordinates Rust package metadata, dependency fetching, library targets, binary targets, and compilation.
How deep it goes
Explains manifest structure through complete examples, but stops short of comprehensive Cargo configuration reference.
Examples
Uses Hello World, an in-memory key-value store, a clock command-line tool, and an operating-system project.
What you can do after
Operate/configure Cargo by declaring package metadata, dependencies, libraries, and executable targets.

Read how Rust in Action: Systems programming concepts and techniques explains cargo.toml →

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.