Linux下的Rust开发调试环境搭建

Linux下的Rust开发调试环境搭建,用的是Debian的一个发行版,这篇文章就是等Windows下的安装过程写的,所以也推荐别用Windows玩Rust了,算了,花哨的功能真香,微软…

下载 Rustup 并安装 Rust

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

配置Rustup

info: downloading installer

Welcome to Rust!

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

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

  /root/.rustup

This can be modified with the RUSTUP_HOME environment variable.

The Cargo home directory located at:

  /root/.cargo

This can be modified with the CARGO_HOME environment variable.

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

  /root/.cargo/bin

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

  /root/.profile

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                                                                                                                                                                                                                     
>                               

输入1就是默认安装,2就是自定义安装,3就是取消安装
在这里我选择1
差不多等待下载一段时间,会提示你安装完毕
刷新终端source $HOME/.cargo/env
输入rustc --version
输入这样的版本号则表示安装成功
在这里插入图片描述

你可能感兴趣的:(Rust,rust,linux)