O'Reilly logo

Mastering Rust by Vesa Kaihlavirta

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 2 - Using Cargo to Build Your First Program

The Cargo tool is the official package manager and build tool. It allows configuring package dependencies, building, running, and testing Rust software. Cargo is extensible, so additional functionality can be added via third-party packages.

Projects are configured in a single file, Cargo.toml. TOML is a configuration language that is essentially an INI, a file format extended with tree forms, lists, and dictionaries.

The de facto Rust code formatter tool is rustfmt. Clippy is a tool that can make additional style and pedantic checks on your codebase. It requires the nightly compiler as it works via compiler plugins. Racer does lookups into library code, giving code completion and tooltips. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required