As Wikipedia says, Rust is a multi-paradigm, high-level, general-purpose programming language designed for performance and safety, especially safe concurrency. Rust is syntactically similar to C++, but can guarantee memory safety by using a borrow checker to validate references. Rust achieves memory safety without garbage collection, and reference counting is optional.
Debian ships the Rust compiler, the Rust package manager and build system, cargo, a number of packages written in Rust or including modules written in Rust, and a growing number of Rust crates (Rust libraries).
Due to the way Rust and the Rust crates are packaged in Debian, packages shipping Rust crates are only useful when packaging other crates or Rust-based software for Debian. While you can use them for everyday development with Rust, their main use is as dependencies for other applications since Debian doesn't allow downloading source code at build-time.
To only use the local (debian) version of crates, place the following snippet in a .cargo/config file at your projects' root:
[source] [source.debian-packages] directory = "/usr/share/cargo/registry" [source.crates-io] replace-with = "debian-packages"
.. and install any of its crate dependencies via apt install librust-CRATE-dev (or declare them in debian/control if it's for a package).
To read more about packaging Rust-based software for Debian, see the Rust team’s wiki pages: Teams/RustPackaging
For everyday Rust development, you may find rustup useful, as it provides a convenient way to install Rust toolchains and switch between them globally or on a per-project basis. Unfortunately, Debian currently doesn’t ship rustup as a package. There is an ITP open here.