<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>第22章 不安全操作 on 编程那些事儿</title><link>https://before80.github.io/prgms/Rust/RustByExample/unsafe/</link><description>Recent content in 第22章 不安全操作 on 编程那些事儿</description><generator>Hugo</generator><language>zh-cn</language><lastBuildDate>Fri, 21 Aug 2026 22:34:20 +0800</lastBuildDate><atom:link href="https://before80.github.io/prgms/Rust/RustByExample/unsafe/index.xml" rel="self" type="application/rss+xml"/><item><title>01-内联汇编</title><link>https://before80.github.io/prgms/Rust/RustByExample/unsafe/01-asm/</link><pubDate>Thu, 20 Aug 2026 21:20:00 +0800</pubDate><guid>https://before80.github.io/prgms/Rust/RustByExample/unsafe/01-asm/</guid><description>&lt;blockquote&gt;
&lt;p&gt;译文 · 基于 &lt;a href="https://doc.rust-lang.org/stable/rust-by-example/"&gt;Rust By Example&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;原文链接: &lt;a href="https://doc.rust-lang.org/stable/rust-by-example/unsafe/asm.html"&gt;https://doc.rust-lang.org/stable/rust-by-example/unsafe/asm.html&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h1 id="内联汇编"&gt;内联汇编&lt;/h1&gt;
&lt;p&gt;Rust 通过 &lt;code&gt;asm!&lt;/code&gt; 宏提供内联汇编支持。
可用它把手工编写的汇编嵌入到编译器生成的汇编输出中。
通常并不需要这样做，但在无法以其他方式达到所需性能或时序时可能有用。
访问底层硬件原语（例如内核代码）也可能需要此功能。&lt;/p&gt;</description></item></channel></rss>