Update chapter_2.md

This commit is contained in:
令狐一冲
2023-05-17 10:55:04 +08:00
committed by GitHub
parent f56b20129f
commit f352f1c2f9

View File

@@ -120,7 +120,7 @@ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
2. 对于Windows用户
- 访问https://rustup.rs/,点击"Get started"。
- 访问https://rustup.rs/ ,点击"Get started"。
- 下载rustup-init.exe安装程序。
- 双击rustup-init.exe运行安装程序按照提示操作。
- 在安装过程中,选择默认选项(按回车键)即可。
@@ -143,9 +143,10 @@ Rust使用Cargo作为官方的构建工具和包管理器下面通过Cargo创
```
cargo new hello_world
```
创建后,可以看到整个目录的结构如下:
![目录结构](../assets/62.png)
其中Cargo.toml是项目的配置文件src为源代码目录main.rs为主程序文件。
### 2.3.2 编写程序