<button class=btn>On this page <i>β‘οΈ</i></button></nav><header><h1>Installation</h1><p></p></header><div id=article-body><h2 id=rustup>Rustup</h2><p>There are many ways to install Rust on your system. For the moment the official way to install Rust is using <a href=https://rustup.rs/ target=_blank>Rustup</a>.</p><p><a href=https://rust-lang.github.io/rustup/index.html target=_blank>π</a> Rustup installs The Rust Programming Language from the official release channels, enabling you to easily switch between <strong>stable, beta, and nightly</strong> compilers and keep them updated. It also makes cross-compiling simpler with binary builds of the standard library for common platforms.</p><p><a href=https://rust-lang.github.io/rustup/installation/index.html target=_blank>π</a> Rustup installs <strong><code>rustc</code>, <code>cargo</code>, <code>rustup</code></strong> and other standard tools to Cargo’s <code>bin</code> directory. On Unix it is located at <code>$HOME/.cargo/bin</code> and on Windows at <code>%USERPROFILE%\.cargo\bin</code>. This is the same directory that <code>cargo install</code> will install Rust programs and Cargo plugins.</p><blockquote><p>π The main tools Rustup installs to the Cargo’s <code>bin</code> directory,</p><ul><li><code>rustc</code>: The Rust compiler.</li><li><code>cargo</code>: The Rustβs built-in package manager and the build system.</li><li><code>rustup</code>: The Rust toolchain installer.</li><li><code>rustfmt</code>: The Rustβs official tool of formatting Rust code according to style guidelines.</li><li><code>cargo-fmt</code>: Helps to run <code>rustfmt</code> on whole Rust projects, including multi-crate workspaces.</li><li><code>cargo-clippy</code>: A lint tool that provides extra checks for common mistakes and stylistic choices.</li><li><code>cargo-miri</code>:An experimental Rust interpreter, which can be used for checking for undefined-behavior.</li><li><code>rustdoc</code>: A local copy of the Rust documentation.</li><li><code>rust-analyzer</code>: A language server that provides support for editors and IDEs.</li><li><code>rust-gdb</code>: A debugger that wraps GNU Debugger(GDB).</li></ul></blockquote><h2 id=installation>Installation</h2><h3 id=for-mac-and-linux-users>For Mac and Linux Users</h3><div class=highlight><pre tabindex=0 class=chroma><code class=language-bash data-lang=bash><span class=line><span class=cl>curl --proto <span class=s1>'=https'</span> --tlsv1.2 -sSf https://sh.rustup.rs <span class=p>|</span> sh
0 commit comments