rust学习记录2 - hello world
本文介绍了如何使用 Cargo 创建一个名为 "hello_world" 的 Rust 项目。首先,在指定目录下使用 `cargo new hello_world` 命令创建项目。该命令会生成包含 `Cargo.toml` 和 `main.rs` 文件的项目目录结构。 `Cargo.toml` 是 Cargo 包管理工具的配置文件,`main.rs` 文件包含 Rust 代码。 最后,运行 `cargo run` 命令即可在终端上看到 "Hello, world!" 的输出。