Rust 入坑

Last Edited Time
Dec 26, 2023 10:11 AM
date
Nov 13, 2023
slug
rust-getting-started
status
Published
tags
Rust
Notebook
summary
小前端啊鸡开始入坑 Rust 啦
type
Post

快速开始

安装 Rust

sudo curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
运行命令后会创建以下几个目录:
  • Rustup home directory:/Users/jiyu/.rustup
  • Cargo home directory:/Users/jiyu/.cargo
  • Command:/Users/jiyu/.cargo/bin
  • Path Variable:/Users/jiyu/.profile

卸载 Rust

rustup self uninstall

安装 rustlings 练习工具

git clone -b 5.6.1 --depth 1 https://github.com/rust-lang/rustlings
cd rustlings
cargo install --force --path .

卸载 rustlings 练习工具

# 查询全局安装的包
cargo install --list
# 卸载对应全局的包
cargo uninstall rustlings

解决答案仓库

References