Loading tutorials
cargo new, read basic Rust syntax and use paths, and run commands in a terminal. You don't need to know how version requirements work in detail. The next chapters cover cargo add and SemVer. Here you learn what a dependency declaration is and 5 min readcargo new, you know what a crate is, and you have read the [dependencies] table in Cargo.toml. Here you will use the cargo add and cargo remove commands to change that table from the terminal instead of editing it by hand.6 min readserde and serde_json to Cargo.toml. This chapter covers what happens next: how a dependency name in the manifest becomes a path you can write in Rust, and what goes wrong when the two disagree.6 min readcargo new, you have read a [dependencies] table in Cargo.toml, and you know how cargo add writes an entry there. Here you learn what the version string in an entry means, how Cargo uses it to choose a version, and where the rules cause surprises.6 min readCargo.toml, read a SemVer requirement such as "1.2.3" or "~1.2.3", and run cargo build. Here you will learn what Cargo.lock records, how Cargo keeps it in sync with the manifest, when to commit it, and which flags make a build fa6 min readcargo add or by editing [dependencies]. It also assumes you can read a SemVer requirement such as "1". You should be able to build a small project with cargo build.6 min readCargo.toml. It also assumes you know how SemVer requirements such as "1.2.3" and "~1.2.3" work, and that you know Cargo.lock records the exact versions Cargo chose. If any of that is unfamiliar, read the chapters on version require6 min readcargo tree prints the full graph Cargo resolved for your project. It shows which crates you depend on directly, which ones arrive indirectly, which versions were chosen, and which features are on.7 min read[dependencies] table, version requirements and Cargo.lock from earlier chap4 min readcargo new, read a [dependencies] table, and understand SemVer requirements such as "1" and "0.2.3". It also assumes you know what Cargo.lock records. Earlier chapters covered these. Here you apply them to a project made of several packages5 min read