mac安装rust

1.安装

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

使用brew各类出错,还慢。curl

2.版本查看

rustc --version

3.安装包版本查看

cargo --version

4.第一个例子

名为hello.rsurl

fn main() {

    println!("Hello World!");
}

5.编译代码

rustc hello.rs

6.运行可执行文件

./hello

相关文章
相关标签/搜索