User Tools

Site Tools


rust_installation

Rust installation

Return to Rust Configuration, Rust, Installation, Cloud Monk's Development PC DevOps Automation via Ansible-Chocolatey-PowerShell-Homebrew-DNF-APT

https://www.rust-lang.org/tools/install

Install Rust

Using rustup (Recommended)

It looks like you’re running macOS, Linux, or another Unix-like OS. To download Rustup and install Rust, run the following in your terminal, then follow the on-screen instructions. See “Other Installation Methods” if you are on Windows.

curl –proto '=https' –tlsv1.2 -sSf https://sh.rustup.rs | sh

Notes about Rust installation

Getting started

If you're just getting started with Rust and would like a more detailed walk-through, see our getting started page.

Toolchain management with rustup

Rust is installed and managed by the rustup tool. Rust has a 6-week rapid release process and supports a great number of platforms, so there are many builds of Rust available at any time. rustup manages these builds in a consistent way on every platform that Rust supports, enabling installation of Rust from the beta and nightly release channels as well as support for additional cross-compilation targets.

If you've installed rustup in the past, you can update your installation by running rustup update.

For more information see the rustup documentation.

Configuring the PATH environment variable In the Rust development environment, all tools are installed to the ~/.cargo/bin directory, and this is where you will find the Rust toolchain, including rustc, cargo, and rustup.

Accordingly, it is customary for Rust developers to include this directory in their PATH environment variable. During installation rustup will attempt to configure the PATH. Because of differences between platforms, command shells, and bugs in rustup, the modifications to PATH may not take effect until the console is restarted, or the user is logged out, or it may not succeed at all.

If, after installation, running rustc –version in the console fails, this is the most likely reason.

Uninstall Rust

If at any point you would like to uninstall Rust, you can run rustup self uninstall. We'll miss you though!

Other installation methods The installation described above, via rustup, is the preferred way to install Rust for most developers. However, Rust can be installed via other methods as well.

Rust Install on Rocky Linux Sample Output

ping sh.rustup.rs

PING dks7yomi95k2d.cloudfront.net (18.154.206.47) 56(84) bytes of data. 64 bytes from server-18-154-206-47.lax50.r.cloudfront.net (18.154.206.47): icmp_seq=1 ttl=243 time=19.0 ms 64 bytes from server-18-154-206-47.lax50.r.cloudfront.net (18.154.206.47): icmp_seq=2 ttl=243 time=17.2 ms

— dks7yomi95k2d.cloudfront.net ping statistics — 2 packets transmitted, 2 received, 0% packet loss, time 1002ms rtt min/avg/max/mdev = 17.184/18.097/19.011/0.913 ms

(base) [USERNAME@localhost ~]$ curl –proto '=https' –tlsv1.2 -sSf https://sh.rustup.rs | sh

info: downloading installer

Welcome to Rust!

This will download and install the official compiler for the Rust programming language, and its Rust package manager, Cargo.

Rustup metadata and Rust toolchains will be installed into the Rustup home directory, located at:

/home/USERNAME/.rustup

This can be modified with the RUSTUP_HOME environment variable.

The Cargo home directory is located at:

/home/USERNAME/.cargo

This can be modified with the CARGO_HOME environment variable.

The cargo, rustc, rustup and other Rust commands will be added to Cargo's bin directory, located at:

/home/bowman/.cargo/bin

This path will then be added to your PATH environment variable by modifying the profile files located at:

You can uninstall at any time with rustup self uninstall and these changes will be reverted.

Current installation options:

default host triple: x86_64-unknown-linux-gnu

default toolchain: stable (default)

profile: default

modify PATH variable: yes

1) Proceed with installation (default)

2) Customize installation

3) Cancel installation

2

I'm going to ask you the value of each of these installation options.

You may simply press the Enter key to leave unchanged.

Default host triple? [x86_64-unknown-linux-gnu]

Default toolchain? (stable/beta/nightly/none) [stable]

Profile (which tools and data to install)? (minimal/default/complete) [default] complete

Modify PATH variable? (Y/n)

Y

Current installation options:

default host triple: x86_64-unknown-linux-gnu

default toolchain: stable

profile: complete

modify PATH variable: yes

1) Proceed with installation (default)

2) Customize installation

3) Cancel installation

1

info: profile set to 'complete'

info: setting default host triple to x86_64-unknown-linux-gnu

info: syncing channel updates for 'stable-x86_64-unknown-linux-gnu'

info: latest update on 2022-09-22, rust version 1.64.0 (a55dd71d5 2022-09-19)

warning: Force-skipping unavailable component 'miri-x86_64-unknown-linux-gnu'

info: downloading component 'cargo'

info: downloading component 'clippy'

info: downloading component 'llvm-tools-preview'

22.6 MiB /  22.6 MiB (100 %)  10.6 MiB/s in  2s ETA:  0s

info: downloading component 'rls'

info: downloading component 'rust-analysis'

info: downloading component 'rust-analyzer'

info: downloading component 'rust-docs'

18.8 MiB /  18.8 MiB (100 %)  10.7 MiB/s in  1s ETA:  0s

info: downloading component 'rust-src'

info: downloading component 'rust-std'

27.4 MiB /  27.4 MiB (100 %)  10.7 MiB/s in  2s ETA:  0s

info: downloading component 'rustc'

54.2 MiB /  54.2 MiB (100 %)  10.2 MiB/s in  5s ETA:  0s

info: downloading component 'rustfmt'

info: installing component 'cargo'

info: installing component 'clippy'

info: installing component 'llvm-tools-preview'

22.6 MiB /  22.6 MiB (100 %)  12.7 MiB/s in  1s ETA:  0s

info: installing component 'rls'

info: installing component 'rust-analysis'

info: installing component 'rust-analyzer'

info: installing component 'rust-docs'

18.8 MiB /  18.8 MiB (100 %)   9.5 MiB/s in  1s ETA:  0s

info: installing component 'rust-src'

info: installing component 'rust-std'

27.4 MiB /  27.4 MiB (100 %)  12.2 MiB/s in  2s ETA:  0s

info: installing component 'rustc'

54.2 MiB /  54.2 MiB (100 %)  15.7 MiB/s in  4s ETA:  0s

info: installing component 'rustfmt'

info: default toolchain set to 'stable-x86_64-unknown-linux-gnu'

stable-x86_64-unknown-linux-gnu installed - rustc 1.64.0 (a55dd71d5 2022-09-19)

Rust is installed now. Great!

To get started you may need to restart your current shell. This would reload your PATH environment variable to include Cargo's bin directory ($HOME/.cargo/bin).

To configure your current shell, run:

source “$HOME/.cargo/env”

(base) [USERNAME@localhost ~]$

Cloud

K8S

OpenShift

Docker

AWS

Azure

GCP

IBM Cloud

IBM z/OS Mainframe

Oracle Cloud

DigitalOcean

Configuration Management

Ansible

Chef

Puppet

Operating Systems

Windows

macOS

iOS

Android

Linux/UNIX

Ubuntu-Debian

SnapCraft

RHEL-Fedora-Rocky-Oracle

FreeBSD

GitHub


Snippet from Wikipedia: Rust

Rust is an iron oxide, a usually reddish-brown oxide formed by the reaction of iron and oxygen in the catalytic presence of water or air moisture. Rust consists of hydrous iron(III) oxides (Fe2O3·nH2O) and iron(III) oxide-hydroxide (FeO(OH), Fe(OH)3), and is typically associated with the corrosion of refined iron.

Given sufficient time, any iron mass, in the presence of water and oxygen, could eventually convert entirely to rust. Surface rust is commonly flaky and friable, and provides no passivational protection to the underlying iron, unlike the formation of patina on copper surfaces. Rusting is the common term for corrosion of elemental iron and its alloys such as steel. Many other metals undergo similar corrosion, but the resulting oxides are not commonly called "rust".

Several forms of rust are distinguishable both visually and by spectroscopy, and form under different circumstances. Other forms of rust include the result of reactions between iron and chloride in an environment deprived of oxygen. Rebar used in underwater concrete pillars, which generates green rust, is an example. Although rusting is generally a negative aspect of iron, a particular form of rusting, known as stable rust, causes the object to have a thin coating of rust over the top. If kept in low relative humidity, it makes the "stable" layer protective to the iron below, but not to the extent of other oxides such as aluminium oxide on aluminium.

Fair Use Sources


© 1994 - 2024 Cloud Monk Losang Jinpa or Fair Use. Disclaimers

SYI LU SENG E MU CHYWE YE. NAN. WEI LA YE. WEI LA YE. SA WA HE.


Rust: Rust Fundamentals, Rust Inventor: Rust Language Designer: Graydon Hoare on July 7, 2010; Rust RFCs, Rust Scripting, Rust Keywords, Rust Built-In Data Types, Rust Data Structures - Rust Algorithms, Rust Syntax, Rust OOP - Rust Design Patterns, Rust Package Manager (cargo-crates.io - Rust Crates - Rust Cargo), Rust Virtualization, Rust Interpreter, Rust REPL, Rust IDEs (JetBrains RustRover, IntelliJ - CLion with JetBrains Rust Plugins, Visual Studio Code), Rust Development Tools, Rust Linter, Rustaceans-Rust User, Rust Uses, List of Rust Software, Rust Popularity, Rust Compiler (rustc), Rust Transpiler, Rust DevOps - Rust SRE, Rust Data Science - Rust DataOps, Rust Machine Learning, Rust Deep Learning, Functional Rust, Rust Concurrency - Rust Parallel Programming - Async Rust, Rust Standard Library, Rust Testing, Rust Libraries, Rust Frameworks, Rust History, Rust Bibliography, Manning Rust Series, Rust Glossary - Rust Official Glossary, Rust Topics, Rust Courses, Rust Research, Rust GitHub, Written in Rust, Rust Awesome List. (navbar_rust)

rust_installation.txt · Last modified: 2024/04/28 03:44 (external edit)