<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Takumi Shimada</title>
    <description>The latest articles on DEV Community by Takumi Shimada (@garasubo).</description>
    <link>https://dev.to/garasubo</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3691045%2Fe3ce75c9-310c-49af-9cb0-227210f2c246.png</url>
      <title>DEV Community: Takumi Shimada</title>
      <link>https://dev.to/garasubo</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/garasubo"/>
    <language>en</language>
    <item>
      <title>Rust updates for low-level systems in 2025</title>
      <dc:creator>Takumi Shimada</dc:creator>
      <pubDate>Sat, 03 Jan 2026 09:22:48 +0000</pubDate>
      <link>https://dev.to/garasubo/rust-updates-for-low-level-systems-in-2025-426c</link>
      <guid>https://dev.to/garasubo/rust-updates-for-low-level-systems-in-2025-426c</guid>
      <description>&lt;p&gt;This is an English version of my blog post. The original version (in Japanese) is &lt;a href="https://zenn.dev/garasubo/articles/cfcf8bb6a16dca" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;/p&gt;




&lt;p&gt;Rust releases a new version every 6 weeks.&lt;/p&gt;

&lt;p&gt;Throughout 2025, versions 1.84.0 through 1.92.0 were released. Each release includes a wide range of improvements — reading the release notes makes it clear how steadily Rust is evolving.&lt;/p&gt;

&lt;p&gt;In this post, I’ll highlight updates relevant to low-level systems development.&lt;/p&gt;

&lt;h3&gt;
  
  
  Naked functions
&lt;/h3&gt;

&lt;p&gt;In Rust 1.88.0, naked functions were stabilized. Normally, Rust inserts special prologue and epilogue code at function entry and exit. This can cause problems when you use inline assembly and return directly to the caller in your assembly code, because it skips the epilogue code necessary for proper function return. For example, if certain registers are pushed onto the stack in the prologue and are supposed to be popped in the epilogue, skipping these steps can leave the stack pointer in an incorrect state. The Rust compiler won’t add this special prologue and epilogue code to functions with the &lt;code&gt;naked&lt;/code&gt; attribute, allowing you to handle the return sequence from inline assembly manually.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://blog.rust-lang.org/2025/06/26/Rust-1.88.0/#naked-functions" rel="noopener noreferrer"&gt;https://blog.rust-lang.org/2025/06/26/Rust-1.88.0/#naked-functions&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the official blog post, the example adds &lt;code&gt;#[unsafe(naked)]&lt;/code&gt; attribute to the function. You may not be familiar with &lt;code&gt;unsafe&lt;/code&gt; in attributes, but this feature was introduced in the Rust 2024 edition.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-attributes.html" rel="noopener noreferrer"&gt;https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-attributes.html&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Improvements to raw pointer handling
&lt;/h3&gt;

&lt;p&gt;In low-level systems development, raw pointers are often unavoidable. Raw pointers are challenging because using them bypasses Rust’s ownership and lifetime models, which are the language’s key safety features.&lt;/p&gt;

&lt;p&gt;One of the big changes is strict provenance APIs introduced in 1.84.0.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://blog.rust-lang.org/2025/01/09/Rust-1.84.0/#strict-provenance-apis" rel="noopener noreferrer"&gt;Announcing Rust 1.84.0 | Rust Blog&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;With these APIs, the compiler can understand where raw pointers originate, which provides benefits when using tools like Miri and CHERI.&lt;/p&gt;

&lt;p&gt;In 1.84.0, creating pointers from pointer dereferences became safe (e.g., addr_of!((*ptr).field) — this code only generates an address, so it's safe even if ptr is invalid). Additionally, a lint was added that warns when creating pointers from immediately-dropped values.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/rust-lang/rust/pull/129248" rel="noopener noreferrer"&gt;Taking a raw ref (&lt;code&gt;&amp;amp;raw (const|mut)&lt;/code&gt;) of a deref of pointer (&lt;code&gt;*ptr&lt;/code&gt;) is always safe by compiler-errors · Pull Request #129248 · rust-lang/rust&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/rust-lang/rust/pull/128985" rel="noopener noreferrer"&gt;Lint against getting pointers from immediately dropped temporaries by GrigorenkoPV · Pull Request #128985 · rust-lang/rust&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;1.86.0 added debug assertions to check whether accessed raw pointers are non-null. This makes invalid pointer access cause a runtime panic when debug assertions are enabled in the build.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://blog.rust-lang.org/2025/04/03/Rust-1.86.0/#debug-assertions-that-pointers-are-non-null-when-required-for-soundness" rel="noopener noreferrer"&gt;Announcing Rust 1.86.0 | Rust Blog&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Overall, Rust has added more safety checks and tooling support around raw pointer usage.&lt;/p&gt;

&lt;h3&gt;
  
  
  Edition 2024
&lt;/h3&gt;

&lt;p&gt;One of the biggest changes in 2025 is that Rust Edition 2024 was released. Edition 2024 is available from 1.85.0. You can see the details in the Edition Guide.&lt;/p&gt;

&lt;p&gt;The following changes are particularly relevant to low-level systems programming:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-extern.html" rel="noopener noreferrer"&gt;unsafe extern&lt;/a&gt;

&lt;ul&gt;
&lt;li&gt;The unsafe keyword can be applied to an extern block (e.g., when calling external C functions), allowing the potential unsafety to be expressed more explicitly.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;a href="https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-attributes.html" rel="noopener noreferrer"&gt;unsafe attribute&lt;/a&gt;

&lt;ul&gt;
&lt;li&gt;Attributes that require developers to uphold the required safety guarantees, such as no_mangle and extern_name, now require the unsafe keyword.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;a href="https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html" rel="noopener noreferrer"&gt;unsafe_op_in_unsafe_fn warning&lt;/a&gt;

&lt;ul&gt;
&lt;li&gt;A lint that warns when calling unsafe functions inside unsafe functions without wrapping them in an unsafe block is now enabled by default&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;a href="https://doc.rust-lang.org/edition-guide/rust-2024/static-mut-references.html" rel="noopener noreferrer"&gt;Disallow references to static mut&lt;/a&gt;

&lt;ul&gt;
&lt;li&gt;A lint that makes references to static mut variables a compilation error is now enabled by default&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;These changes require unsafe annotations in more places, and the lints have become stricter.&lt;/p&gt;

&lt;h3&gt;
  
  
  Target features
&lt;/h3&gt;

&lt;p&gt;In 1.86.0, the #[target_feature] attribute can now be applied to safe functions. Normally, calling functions marked with target_feature requires an unsafe block, but when calling them from a function with the same target feature enabled, no unsafe annotation is needed.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://blog.rust-lang.org/2025/04/03/Rust-1.86.0/#allow-safe-functions-to-be-marked-with-the-target-feature-attribute" rel="noopener noreferrer"&gt;Announcing Rust 1.86.0 | Rust Blog&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In 1.87.0, unsafe functions in std::arch were converted to safe functions using this target feature mechanism, and in 1.89.0, even more functions became safe.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://blog.rust-lang.org/2025/05/15/Rust-1.87.0/#safe-architecture-intrinsics" rel="noopener noreferrer"&gt;Announcing Rust 1.87.0 and ten years of Rust! | Rust Blog&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://blog.rust-lang.org/2025/08/07/Rust-1.89.0/#more-x86-target-features" rel="noopener noreferrer"&gt;Announcing Rust 1.89.0 | Rust Blog&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  asm goto
&lt;/h3&gt;

&lt;p&gt;You can now jump from inline assembly to code blocks written in Rust.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://blog.rust-lang.org/2025/05/15/Rust-1.87.0/#asm-jumps-to-rust-code" rel="noopener noreferrer"&gt;Announcing Rust 1.87.0 and ten years of Rust! | Rust Blog&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here is the example from the document:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;unsafe {
 core::arch::asm!(“jmp {}”, label {
 println!(“Hello from inline assembly label”);
 });
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Other notable changes
&lt;/h3&gt;

&lt;p&gt;There were many more changes. Here is the list:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://github.com/rust-lang/rust/pull/129582" rel="noopener noreferrer"&gt;drop will be executed in unwinding when extern “C” function panics&lt;/a&gt;（1.84.0）&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://blog.rust-lang.org/2025/04/03/Rust-1.86.0/#make-missing-abi-lint-warn-by-default" rel="noopener noreferrer"&gt;A lint that warns when ABI is omitted in extern is now enabled by default&lt;/a&gt; (1.86.0)&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://blog.rust-lang.org/2025/08/07/Rust-1.89.0/#cross-compiled-doctests" rel="noopener noreferrer"&gt;Cross-compiled doctests are supported&lt;/a&gt; (1.89.0)&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://blog.rust-lang.org/2025/08/07/Rust-1.89.0/#i128-and-u128-in-extern-c-functions" rel="noopener noreferrer"&gt;i128 and u128 are now allowed in extern “C” functions&lt;/a&gt; (1.89.0)&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://blog.rust-lang.org/2025/08/07/Rust-1.89.0/#explicitly-inferred-arguments-to-const-generics" rel="noopener noreferrer"&gt;The compiler can infer arguments to const generics&lt;/a&gt; (1.89.0)&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;There were several changes in Rust, although this post focused on low-level systems development.&lt;br&gt;&lt;br&gt;
These updates will help us write safer low-level systems code in Rust.&lt;/p&gt;

</description>
      <category>embeddedsystems</category>
      <category>rust</category>
      <category>operatingsystems</category>
    </item>
  </channel>
</rss>
