<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>5 参与贡献 on 编程那些事儿</title><link>https://before80.github.io/prgms/Rust/rustRandom/contributing/</link><description>Recent content in 5 参与贡献 on 编程那些事儿</description><generator>Hugo</generator><language>zh-cn</language><lastBuildDate>Sun, 23 Aug 2026 21:05:58 +0800</lastBuildDate><atom:link href="https://before80.github.io/prgms/Rust/rustRandom/contributing/index.xml" rel="self" type="application/rss+xml"/><item><title>5.1 文档</title><link>https://before80.github.io/prgms/Rust/rustRandom/contributing/5.1-documentation/</link><pubDate>Sun, 23 Aug 2026 16:44:00 +0800</pubDate><guid>https://before80.github.io/prgms/Rust/rustRandom/contributing/5.1-documentation/</guid><description>&lt;blockquote&gt;
&lt;p&gt;原文链接: &lt;a href="https://rust-random.github.io/book/contrib-doc.html"&gt;https://rust-random.github.io/book/contrib-doc.html&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3 id="风格"&gt;风格&lt;/h3&gt;
&lt;p&gt;所有文档均为英文，但不偏好任何特定方言。&lt;/p&gt;
&lt;p&gt;文档应面向多种受众：既包括经验丰富的 Rustacean，也包括相对新手；既有统计建模或密码学经验的人，也包括对这些主题陌生的人。由于往往无法编写适合所有人的文档，我们倾向于简洁的技术文档，并引用面向更特定受众的扩展文章。&lt;/p&gt;</description></item><item><title>5.2 范围</title><link>https://before80.github.io/prgms/Rust/rustRandom/contributing/5.2-scope/</link><pubDate>Sun, 23 Aug 2026 16:44:00 +0800</pubDate><guid>https://before80.github.io/prgms/Rust/rustRandom/contributing/5.2-scope/</guid><description>&lt;blockquote&gt;
&lt;p&gt;原文链接: &lt;a href="https://rust-random.github.io/book/contrib-scope.html"&gt;https://rust-random.github.io/book/contrib-scope.html&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;随着时间的推移，项目范围不断扩大，Rand 从使用单体 crate 转变为使用「主」crate 加上多个单一用途 crate。对于新功能，必须考虑它是否适合 Rand 项目，以及适合放在何处。&lt;/p&gt;</description></item><item><title>5.3 测试</title><link>https://before80.github.io/prgms/Rust/rustRandom/contributing/5.3-testing/</link><pubDate>Sun, 23 Aug 2026 16:44:00 +0800</pubDate><guid>https://before80.github.io/prgms/Rust/rustRandom/contributing/5.3-testing/</guid><description>&lt;blockquote&gt;
&lt;p&gt;原文链接: &lt;a href="https://rust-random.github.io/book/contrib-test.html"&gt;https://rust-random.github.io/book/contrib-test.html&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Rand 有许多单元测试，尽管这些测试并不全面或完美（欢迎改进）。我们倾向于为所有新功能编写测试。&lt;/p&gt;
&lt;p&gt;第一行测试只需从相应目录运行 &lt;code&gt;cargo test&lt;/code&gt;。由于 Rand 支持 &lt;code&gt;no_std&lt;/code&gt;（仅 core）、&lt;code&gt;core+alloc&lt;/code&gt; 和 &lt;code&gt;std&lt;/code&gt; 环境，测试所有三种环境很重要（取决于所讨论代码适用的特性）：&lt;/p&gt;</description></item><item><title>5.4 基准测试</title><link>https://before80.github.io/prgms/Rust/rustRandom/contributing/5.4-benchmarks/</link><pubDate>Sun, 23 Aug 2026 16:44:00 +0800</pubDate><guid>https://before80.github.io/prgms/Rust/rustRandom/contributing/5.4-benchmarks/</guid><description>&lt;blockquote&gt;
&lt;p&gt;原文链接: &lt;a href="https://rust-random.github.io/book/contrib-bench.html"&gt;https://rust-random.github.io/book/contrib-bench.html&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;我们已有许多基准测试：&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div style="color:#b0c4de;background-color:#282c34;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;
&lt;table style="border-spacing:0;padding:0;margin:0;border:0;"&gt;&lt;tr&gt;&lt;td style="vertical-align:top;padding:0;margin:0;border:0;"&gt;
&lt;pre tabindex="0" style="color:#b0c4de;background-color:#282c34;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#58626f"&gt;1
&lt;/span&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#58626f"&gt;2
&lt;/span&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#58626f"&gt;3
&lt;/span&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#58626f"&gt;4
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td style="vertical-align:top;padding:0;margin:0;border:0;;width:100%"&gt;
&lt;pre tabindex="0" style="color:#b0c4de;background-color:#282c34;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-sh" data-lang="sh"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;cargo +nightly bench
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#8a93a5;font-style:italic"&gt;# 在少数情况下，nightly 特性可能使用不同的代码路径：&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;cargo +nightly bench --features&lt;span style="color:#54b1c7"&gt;=&lt;/span&gt;nightly
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;分布的基准测试现在位于 &lt;code&gt;rand_distr&lt;/code&gt; crate 中；所有其他基准测试（包括我们所有的 RNG）位于主 &lt;code&gt;rand&lt;/code&gt; crate 中（因此有许多 dev-dependencies）。&lt;/p&gt;</description></item></channel></rss>