1.课程定位
极速带大家入门了解Rust,熟悉熟悉Rust常用语法
2.Rust岗位
比以前多,但是比其他语言少
3.Rust难度
有难度,但是没那么多大,多写多练熟悉Rust的套路
4.推荐
问题咨询加微信:xingzixi2
1.Rust介绍
1.Rust的诞生
Rust最早是格雷顿.霍尔的个人项目,2009年由Mozilla开始赞助这个项目,2015年5月15日正式发布Rust 1.0,这也是第一个稳定版本
2.Rust官网
3.Rust logo
logo
吉祥物Ferris(摩天蟹)
2.Rust环境搭建
1.安装clion
www.jetbrains.com/zh-cn/clion…
需要安装Rust插件
2.安装Rust
www.rust-lang.org/tools/insta…
选择3
选择1
3.配置crates.io镜像
进入cd %USERPROFILE%/.cargo目录
创建以下config.toml文件
[source.crates-io]
replace-with = 'rsproxy-sparse'
[source.rsproxy]
registry = "https://rsproxy.cn/crates.io-index"
[source.rsproxy-sparse]
registry = "sparse+https://rsproxy.cn/index/"
[registries.rsproxy]
index = "https://rsproxy.cn/crates.io-index"
[net]
git-fetch-with-cli = true
4.hello world
执行cargo new helloworld创建项目
fn main() {
println!("Hello, world!");
}
rustup toolchain install stable-x86_64-pc-windows-gnu
rustup default stable-x86_64-pc-windows-gnu