1.安装

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

使用brew各种出错,还慢。

2编译

source $HOME/.cargo/env

3.版本查看

rustc --version

4.安装包版本查看

cargo --version

5.第一个例子

名为hello.rs

fn main() {

    println!("Hello World!");
}

6.编译代码

rustc hello.rs

7.运行可执行文件

./hello

mac安装rust

相关文章:

  • 2021-08-30
  • 2022-12-23
  • 2021-06-04
  • 2021-09-20
  • 2022-12-23
  • 2022-12-23
  • 2021-09-09
  • 2021-12-27
猜你喜欢
  • 2021-05-21
  • 2021-12-30
  • 2021-06-22
  • 2022-02-25
  • 2021-12-23
  • 2021-08-10
  • 2021-12-21
相关资源
相似解决方案