Mac book pro 安装rust 开发环境

首先执行

% brew install rustup-init

然后执行

% rustup-init

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:

  /Users/lester/.rustup

/Users/lester/.profile

  /Users/lester/.zshenv

You can uninstall at any time with rustup self uninstall and

these changes will be reverted.

Current installation options:

   default host triple: x86_64-apple-darwin

     default toolchain: stable (default)

               profile: default

  modify PATH variable: yes

1) Proceed with installation (default)

2) Customize installation

3) Cancel installation

此时可以选择自己需要安装的版本,我选的是nightly

nightly-x86_64-apple-darwin installed - rustc 1.66.0-nightly (c0983a9aa 2022-10-12)

Rust is installed now. Great!

To get started you may need to restart your current shell.

This would reload your PATH environment variable to include

Cargo's bin directory ($HOME/.cargo/bin).

To configure your current shell, run:

source "$HOME/.cargo/env"

设置环境后可以用命令看安装情况

% source "$HOME/.cargo/env"

 % rustup show

Default host: x86_64-apple-darwin

rustup home:  /Users/lester/.rustup

nightly-x86_64-apple-darwin (default)

% rustc --version

rustc 1.66.0-nightly (c0983a9aa 2022-10-12)

% cargo --version

cargo 1.66.0-nightly (b8f30cb23 2022-10-10)

2. IntelliJ IDEA 安装 rust 支持

先安装IntelliJ IDEA 然后 安装rust 插件 

然后 重启后 新建项目选择 左边最下方的 rust 选项,就可以了

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值