<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Rust Programming on AI VOID</title><link>https://ai-blog.noorshomelab.dev/tags/rust-programming/</link><description>Recent content in Rust Programming on AI VOID</description><generator>Hugo</generator><language>en</language><lastBuildDate>Sat, 25 Oct 2025 00:00:00 +0000</lastBuildDate><atom:link href="https://ai-blog.noorshomelab.dev/tags/rust-programming/index.xml" rel="self" type="application/rss+xml"/><item><title>Advanced Topics: Unsafe Rust and FFI</title><link>https://ai-blog.noorshomelab.dev/rust-guide/advanced-unsafe-ffi/</link><pubDate>Sat, 25 Oct 2025 00:00:00 +0000</pubDate><guid>https://ai-blog.noorshomelab.dev/rust-guide/advanced-unsafe-ffi/</guid><description>&lt;h1 id="advanced-topics-unsafe-rust-and-ffi"&gt;Advanced Topics: Unsafe Rust and FFI&lt;/h1&gt;
&lt;p&gt;Rust&amp;rsquo;s strict compile-time safety guarantees are foundational. However, there are scenarios where these guarantees need to be circumvented to achieve specific goals, such as interacting with hardware, operating system features, or code written in other languages. This is where &lt;code&gt;unsafe&lt;/code&gt; Rust and the Foreign Function Interface (FFI) come into play.&lt;/p&gt;
&lt;p&gt;Entering an &lt;code&gt;unsafe&lt;/code&gt; block means you are telling the compiler, &amp;ldquo;I know what I&amp;rsquo;m doing, and I guarantee that this code is memory-safe.&amp;rdquo; The compiler will trust you. It is your responsibility to ensure that &lt;code&gt;unsafe&lt;/code&gt; code &lt;em&gt;actually&lt;/em&gt; upholds Rust&amp;rsquo;s memory safety guarantees.&lt;/p&gt;</description></item></channel></rss>