How To Install rust-src on Ubuntu 20.04

In this tutorial we learn how to install rust-src on Ubuntu 20.04. rust-src is Rust systems programming language - source code Rust systems programming language - source code Rust systems programming language - source code

Introduction

In this tutorial we learn how to install rust-src on Ubuntu 20.04.

What is rust-src

rust-src is:

Rust is a curly-brace, block-structured expression language. It visually resembles the C language family, but differs significantly in syntactic and semantic details. Its design is oriented toward concerns of “programming in the large”, that is, of creating and maintaining boundaries - both abstract and operational - that preserve large-system integrity, availability and concurrency.

It supports a mixture of imperative procedural, concurrent actor, object-oriented and pure functional styles. Rust also supports generic programming and meta-programming, in both static and dynamic styles.

This package contains sources of the Rust compiler and standard libraries, useful for IDEs and code analysis tools such as Racer.

Package: rust-src Architecture: all Version: 1.43.0+dfsg1+llvm-1~exp1ubuntu1~20.04.1 Priority: extra Section: universe/devel Source: rustc Origin: Ubuntu Maintainer: Ubuntu Developers [email protected] Original-Maintainer: Debian Rust Maintainers [email protected] Bugs: https://bugs.launchpad.net/ubuntu/+filebug Installed-Size: 102109 Filename: pool/universe/r/rustc/rust-src_1.43.0+dfsg1+llvm-1~exp1ubuntu1~20.04.1_all.deb Size: 10347372 MD5sum: 59cfd6cbbd69ea0821eb1a9ba8feea8d SHA1: db60cde94ef913733c620ea5e5d0b967cbe4b5ff SHA256: 626d109bd180769bf907aa53eafff0cb92a0d5bcd717e8a4170d3de1caacda89 SHA512: 5981e8107523ce34964f427443276be3ad489c80eee129e1372f7ebf8508c47cdfa32b849bc8a9a853fc62a3a564bc0e22c6fd8595241f585d6a4984e2134358 Homepage: http://www.rust-lang.org/ Description-en: Rust systems programming language - source code Rust is a curly-brace, block-structured expression language. It visually resembles the C language family, but differs significantly in syntactic and semantic details. Its design is oriented toward concerns of “programming in the large”, that is, of creating and maintaining boundaries - both abstract and operational - that preserve large-system integrity, availability and concurrency.

It supports a mixture of imperative procedural, concurrent actor, object-oriented and pure functional styles. Rust also supports generic programming and meta-programming, in both static and dynamic styles.

This package contains sources of the Rust compiler and standard libraries, useful for IDEs and code analysis tools such as Racer.

Package: rust-src Architecture: all Version: 1.41.0+dfsg1+llvm-0ubuntu2 Priority: extra Section: universe/devel Source: rustc Origin: Ubuntu Maintainer: Ubuntu Developers [email protected] Original-Maintainer: Debian Rust Maintainers [email protected] Bugs: https://bugs.launchpad.net/ubuntu/+filebug Installed-Size: 87658 Filename: pool/universe/r/rustc/rust-src_1.41.0+dfsg1+llvm-0ubuntu2_all.deb Size: 9986908 MD5sum: 36cd8bcbe31d746a11e50bbcb7c16e2c SHA1: ef790f47e9658ddad13f114f2d49e2e0af0127f8 SHA256: 0b69617d2b02d8ac7811ca38c39212fde37de97ad588948df92ea5307482ace5 Homepage: http://www.rust-lang.org/ Description-en: Rust systems programming language - source code Rust is a curly-brace, block-structured expression language. It visually resembles the C language family, but differs significantly in syntactic and semantic details. Its design is oriented toward concerns of “programming in the large”, that is, of creating and maintaining boundaries - both abstract and operational - that preserve large-system integrity, availability and concurrency.

It supports a mixture of imperative procedural, concurrent actor, object-oriented and pure functional styles. Rust also supports generic programming and meta-programming, in both static and dynamic styles.

This package contains sources of the Rust compiler and standard libraries, useful for IDEs and code analysis tools such as Racer.

There are three methods to install rust-src on Ubuntu 20.04. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install rust-src Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install rust-src using apt-get by running the following command:

sudo apt-get -y install rust-src

Install rust-src Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install rust-src using apt by running the following command:

sudo apt -y install rust-src

Install rust-src Using aptitude

If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Ubuntu. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install rust-src using aptitude by running the following command:

sudo aptitude -y install rust-src

How To Uninstall rust-src on Ubuntu 20.04

To uninstall only the rust-src package we can use the following command:

sudo apt-get remove rust-src

Uninstall rust-src And Its Dependencies

To uninstall rust-src and its dependencies that are no longer needed by Ubuntu 20.04, we can use the command below:

sudo apt-get -y autoremove rust-src

Remove rust-src Configurations and Data

To remove rust-src configuration and data from Ubuntu 20.04 we can use the following command:

sudo apt-get -y purge rust-src

Remove rust-src configuration, data, and all of its dependencies

We can use the following command to remove rust-src configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge rust-src

References

Summary

In this tutorial we learn how to install rust-src package on Ubuntu 20.04 using different package management tools: apt, apt-get and aptitude.