Rust环境配置

Rust环境配置

fetch150zy

在日用 manjaro 上配置基本 Rust 开发环境

Rust on manjaro

install Rust

by curl

  • install curl

    1
    2
    sudo pacman -Syu
    sudo pacman -S curl
  • install Rust

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

    1
    2
    source ~/.profile
    source ~/.cargo/env
  • op

    1
    2
    3
    rustc --v
    cargo --version
    rustup --version

run

by rustc

1
2
rustc file-name.rs
./file-name

by cargo

  • create new project

    1
    cargo new project-name
  • run

    1
    cargo run

update Rust

by rustup

1
rustup self update

uninstall Rust

by rustup

1
rustup self uninstall