初识 Rust + Vim 使用技巧
一、Rust 安装、更新、卸载
在Linux上安装 Rust:
$ curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf | sh
更新和卸载:
$ rustup update
$ rustup self uninstall
二、Hello, Cargo!
Cargo 是 Rust 的构建系统和包管理器。大多数 Rustacean 们使用 Cargo 来管理他们的 Rust 项目,因为它可以处理很多任务,比如构建代码、下载依赖库并编译这些库。
1.使用 Cargo 创建项目
$ cargo new hello_cargo
$ cd hello_cargo
Cargo 生成的项目将代码放在 src 目录,同时项目根目录包含一个 Cargo.toml 配置