https://github.com/tomoat/rust-learn
❤️ Learn Rust Language
https://github.com/tomoat/rust-learn
Last synced: 3 days ago
JSON representation
❤️ Learn Rust Language
- Host: GitHub
- URL: https://github.com/tomoat/rust-learn
- Owner: tomoat
- Created: 2017-04-01T15:26:04.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-04-04T15:28:13.000Z (about 9 years ago)
- Last Synced: 2025-03-03T08:14:19.343Z (over 1 year ago)
- Language: Rust
- Size: 6.84 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Rust Learn
Rust 是一种系统编程语言。 它具有惊人的运行速度,能够防止程序错误,并保证了线程安全。
## 安装
在Mac环境下安装(两种方式)
* 通用方式
> `$ curl https://sh.rustup.rs -sSf | sh`
* brew 方式
> `brew install rust`
使用通用方式安装完毕之后,需要将 `source $HOME/.cargo/env` 加入到你当前的shell环境中,比如当前为zsh, 就会将此句加入到你的 **~/.zshrc** 文件中。
## 更新
一旦安装完 Rust,更新到最新版本是简单的。在 shell 中运行更新脚本:
> `$ rustup update`
## 卸载
卸载 Rust 同安装一样简单。在 shell 中运行卸载脚本
> `$ rustup self uninstall`
## 验证
安装完 Rust 后,打开 shell,输入:
> `$ rustc —version`
应该能看到类似这样的版本号、提交 hash 和提交日期,对应你安装时的最新稳定版本:
> `rustc x.y.z (abcabcabc yyyy-mm-dd)`
如果出现这些内容,Rust 就安装成功了!
恭喜入坑!(此处应该有掌声!)
## 本地文档
安装程序也包含一份本地文档的拷贝,你可以离线阅读它们。输入`rustup doc`将在浏览器中打开本地文档。
任何你不太确认标准库中提供的类型或函数是干什么的时候,请查看 API 文档!