Loading tutorials
Cargo.lock, one target directory, and, if you choose, common metadata and dependency versions. This chapter explains the problem workspaces solve, what you get from one, and where th7 min readCargo.toml, tell a library crate from a binary crate, and declare dependencies and features. Here you learn what the [workspace] table does, how Cargo finds the root of a workspace, and which settings belong there.5 min readCargo.toml, know the difference between library and binary crates, and have run cargo build and cargo run. It covers the two shapes a workspace root can take, how Cargo treats each, and the errors you will meet when you mix them up.6 min readCargo.toml, you know the difference between library and binary crates, and you have seen a [workspace] table with a members list. Here you will control exactly which directories become workspace members and which of them Cargo builds when you 6 min readCargo.toml, know the difference between library and binary crates, and have run cargo build and cargo test. It builds on the workspace from the previous chapters: a virtual root manifest with crates/textkit (a library) and crates/app (a bi7 min readCargo.toml, know the difference between library and binary crates, and can declare dependencies and features. Here you will see how one workspace member uses another, what Cargo does with that declaration, and which errors you are likely to hit.6 min read[workspace.package] and the field.workspace = true syntax. It assumes you can read a single-package Cargo.toml, know the difference between library and binary crates, and have a workspace root like the one built in the earlier chapters. Cargo 1.64 or newer is required for i5 min readCargo.toml, know how [dependencies] and features work, and have already set up a workspace with a virtual manifest and path dependencies between members. It covers the [workspace.dependencies] table: what it does, how members use it, and the6 min readcargo build, cargo test and cargo run on a single package, and that you have read the earlier chapters on the root manifest, members and path dependencies. It uses the workspace from the earlier chapters: a virtual root manifest with two members, the library `t5 min readrustc has built-in lints, and Clippy and rustdoc add more. In a multi-crate project, each crate usually needs the same lint rules. Without a shared place for them, the rules end up copied into every lib.rs and main.rs, and they drift5 min readmembers, that you know how [features] and optional dependencies work in a single package, and that you have used -p and --workspace. It explains how Cargo picks the feature set for each dependency when several members share on5 min readCargo.toml. It also assumes you have a workspace with a virtual manifest and a few member crates, as built in earlier chapters. You should know the difference between cargo build and cargo build --release.6 min read[workspace.dependencies], as in the earlier chapters. You should also know what cargo publish does for a single crate. Here you will learn what changes when the crates you publish live in a5 min read-p, --workspace and --exclude, and that you understand [workspace.package], [workspace.dependencies] and [workspace.lints]. Here you will put those pieces together into a layout 5 min read