<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>使用 Cargo on 编程那些事儿</title><link>https://before80.github.io/prgms/Rust/comprehensiveRust/cargo/</link><description>Recent content in 使用 Cargo on 编程那些事儿</description><generator>Hugo</generator><language>zh-cn</language><lastBuildDate>Tue, 11 Aug 2026 23:57:44 +0800</lastBuildDate><atom:link href="https://before80.github.io/prgms/Rust/comprehensiveRust/cargo/index.xml" rel="self" type="application/rss+xml"/><item><title>1 Rust 生态</title><link>https://before80.github.io/prgms/Rust/comprehensiveRust/cargo/01-rust-ecosystem/</link><pubDate>Tue, 11 Aug 2026 11:30:00 +0800</pubDate><guid>https://before80.github.io/prgms/Rust/comprehensiveRust/cargo/01-rust-ecosystem/</guid><description>&lt;blockquote&gt;
&lt;p&gt;译文 · 基于 &lt;a href="https://google.github.io/comprehensive-rust/"&gt;Comprehensive Rust&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;原文链接: &lt;a href="https://google.github.io/comprehensive-rust/cargo/rust-ecosystem.html"&gt;https://google.github.io/comprehensive-rust/cargo/rust-ecosystem.html&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h1 id="1-rust-生态"&gt;1 Rust 生态&lt;/h1&gt;
&lt;p&gt;Rust 生态由多种工具组成，其中主要有：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;rustc&lt;/code&gt;：Rust 编译器，把 &lt;code&gt;.rs&lt;/code&gt; 文件变成二进制以及其他中间格式。&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;cargo&lt;/code&gt;：Rust 依赖管理与构建工具。Cargo 知道如何下载依赖（通常托管在 &lt;a href="https://crates.io"&gt;https://crates.io&lt;/a&gt;），并在构建项目时把它们交给 &lt;code&gt;rustc&lt;/code&gt;。Cargo 还内置测试运行器，用于执行单元测试。&lt;/p&gt;</description></item><item><title>2 代码示例</title><link>https://before80.github.io/prgms/Rust/comprehensiveRust/cargo/02-code-samples/</link><pubDate>Tue, 11 Aug 2026 11:30:00 +0800</pubDate><guid>https://before80.github.io/prgms/Rust/comprehensiveRust/cargo/02-code-samples/</guid><description>&lt;blockquote&gt;
&lt;p&gt;译文 · 基于 &lt;a href="https://google.github.io/comprehensive-rust/"&gt;Comprehensive Rust&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;原文链接: &lt;a href="https://google.github.io/comprehensive-rust/cargo/code-samples.html"&gt;https://google.github.io/comprehensive-rust/cargo/code-samples.html&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h1 id="2-代码示例"&gt;2 代码示例&lt;/h1&gt;
&lt;p&gt;本培训主要通过可在浏览器中执行的示例来探索 Rust 语言。这样安装更简单，也能保证每个人体验一致。&lt;/p&gt;
&lt;p&gt;仍建议安装 Cargo：做练习时会更方便。最后一天会有一个更大的练习，演示如何使用依赖，那时需要 Cargo。&lt;/p&gt;</description></item><item><title>3 在本地运行 Cargo</title><link>https://before80.github.io/prgms/Rust/comprehensiveRust/cargo/03-running-locally/</link><pubDate>Tue, 11 Aug 2026 11:30:00 +0800</pubDate><guid>https://before80.github.io/prgms/Rust/comprehensiveRust/cargo/03-running-locally/</guid><description>&lt;blockquote&gt;
&lt;p&gt;译文 · 基于 &lt;a href="https://google.github.io/comprehensive-rust/"&gt;Comprehensive Rust&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;原文链接: &lt;a href="https://google.github.io/comprehensive-rust/cargo/running-locally.html"&gt;https://google.github.io/comprehensive-rust/cargo/running-locally.html&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h1 id="3-在本地运行-cargo"&gt;3 在本地运行 Cargo&lt;/h1&gt;
&lt;p&gt;若想在自己的系统上试验代码，需要先安装 Rust。请按
&lt;a href="https://doc.rust-lang.org/book/ch01-01-installation.html"&gt;《The Rust Book》中的说明&lt;/a&gt; 操作。完成后应能使用 &lt;code&gt;rustc&lt;/code&gt; 与
&lt;code&gt;cargo&lt;/code&gt;。撰写本文时，最新稳定版 Rust 的版本号如下：&lt;/p&gt;</description></item></channel></rss>