Rust 安装

Tags
rust
Created
Jun 24, 2017 3:17 PM

curl https://sh.rustup.rs -sSf | sh

path: ~/.cargo/bin

rust 没有自己的连接器,Linux 系统下 Rust 会尝试调用 cc 进行连接

https://github.com/rust-lang/rustup

rustup default nightly

rustup update

安装组件(依附在 channel 下):

  • rls
  • rust-analysis
  • rust-src
  • wasm

编译:

rustc main.rs

初始化项目:

cargo new hello_world --bin

cargo init --bin

cargo run = cargo build + cargo run

cargo build --release 来优化编译项目

SuperMade with Super