<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>02-运行注册表 on 编程那些事儿</title><link>https://before80.github.io/prgms/Rust/cargo/cargo-reference/registries/running-a-registry/</link><description>Recent content in 02-运行注册表 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/cargo/cargo-reference/registries/running-a-registry/index.xml" rel="self" type="application/rss+xml"/><item><title>01-注册表索引</title><link>https://before80.github.io/prgms/Rust/cargo/cargo-reference/registries/running-a-registry/01-registry-index/</link><pubDate>Thu, 30 Jul 2026 14:49:00 +0800</pubDate><guid>https://before80.github.io/prgms/Rust/cargo/cargo-reference/registries/running-a-registry/01-registry-index/</guid><description>&lt;blockquote&gt;
&lt;p&gt;译文 · 基于 &lt;a href="https://doc.rust-lang.org/cargo/"&gt;The Cargo Book&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h1 id="index-format"&gt;索引格式&lt;/h1&gt;
&lt;blockquote&gt;
&lt;p&gt;原文链接: &lt;a href="https://doc.rust-lang.org/cargo/reference/registry-index.html"&gt;https://doc.rust-lang.org/cargo/reference/registry-index.html&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;以下定义索引的格式。偶尔会添加新特性，仅从引入它们的 Cargo 版本起才能理解。较旧版本的 Cargo 可能无法使用利用新特性的包。不过，较旧包的格式不应改变，因此较旧版本的 Cargo 应能使用它们。&lt;/p&gt;</description></item><item><title>02-注册表 Web API</title><link>https://before80.github.io/prgms/Rust/cargo/cargo-reference/registries/running-a-registry/02-registry-web-api/</link><pubDate>Thu, 30 Jul 2026 14:49:00 +0800</pubDate><guid>https://before80.github.io/prgms/Rust/cargo/cargo-reference/registries/running-a-registry/02-registry-web-api/</guid><description>&lt;blockquote&gt;
&lt;p&gt;译文 · 基于 &lt;a href="https://doc.rust-lang.org/cargo/"&gt;The Cargo Book&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h1 id="web-api"&gt;Web API&lt;/h1&gt;
&lt;blockquote&gt;
&lt;p&gt;原文链接: &lt;a href="https://doc.rust-lang.org/cargo/reference/registry-web-api.html"&gt;https://doc.rust-lang.org/cargo/reference/registry-web-api.html&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;注册表可在 &lt;code&gt;config.json&lt;/code&gt; 中定义的位置托管 Web API，以支持下列任一操作。&lt;/p&gt;
&lt;p&gt;对于需要认证的请求，Cargo 会包含 &lt;code&gt;Authorization&lt;/code&gt; 头。头值为 API token。若 token 无效，服务器应以 403 响应码回应。用户应访问注册表网站获取 token，Cargo 可用 &lt;a href="../../../../cargo-commands/publishing-commands/01-cargo-login/"&gt;&lt;code&gt;cargo login&lt;/code&gt;&lt;/a&gt; 命令存储 token，或在命令行上传入 token。&lt;/p&gt;</description></item></channel></rss>