What is lib.rs?

Lib.rs is a catalog of programs and libraries written in the Rust programming language. It has all 29060 crates (minus spam) from the crates.io registry.

Why use lib.rs?

How to install the crates?

Library crates

Run once:

cargo install cargo-edit

and then to add a library to your project, run:

cargo add library-name-here

Application crates

Install Rust via Rustup. It's important to use rustup — Rust bundled with Linux distros (like Debian) is outdated and generally won't work. If you have installed Rust already, run rustup update.

To install an app, run:

cargo install -f app-name-here

This will install it in ~/.cargo/bin and make it available from the command line.