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

Cargo and crates

To write a larger program, you need some way of declaring what your program is about, how it should be built, and what its dependencies are. You will also need a way to act on those declarations. Furthermore, to support the whole programming ecosystem, you need a centralized place to find those dependencies.

For Rust, Cargo is the tool for doing all these things, and https://crates.io/ is the centralized place. If you ran rustup as it was described in the previous chapter, you have cargo installed along with rustc.

To see help on cargo, run it without parameters:

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