<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Rust on</title><link>https://www.ardanlabs.com/categories/rust/</link><description>Recent content in Rust on</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Wed, 07 Jan 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://www.ardanlabs.com/categories/rust/index.xml" rel="self" type="application/rss+xml"/><item><title>Everything You Wanted to Ask About Rust – Answered by Herbert Wolverson</title><link>https://www.ardanlabs.com/blog/2026/01/everything-you-wanted-to-ask-about-rust-answered-by-herbert-wolverson/</link><pubDate>Wed, 07 Jan 2026 00:00:00 +0000</pubDate><guid>https://www.ardanlabs.com/blog/2026/01/everything-you-wanted-to-ask-about-rust-answered-by-herbert-wolverson/</guid><description>&lt;p&gt;In a recent livestream with JetBrains, Vitaly Bragilevsky sat down with Herbert Wolverson, our Lead Rust Consultant and Instructor here at Ardan Labs, to talk about everything Rust developers – beginners and pros alike – are curious about.&lt;/p&gt;&#10;&lt;p&gt;Watch the full livestream replay on the Ardan Labs Channel and check out the &lt;a href="https://github.com/thebracket/JetBrainsWinter"&gt;GitHub repo&lt;/a&gt; with Herbert’s prepared answers and code samples. Below is a short summary of the 23 questions that were covered during the livestream.&lt;/p&gt;</description></item><item><title>Fearless Concurrency Ep.7: Lock-Free Structures and Channels for Scalable Rust Code</title><link>https://www.ardanlabs.com/blog/2024/12/fearless-concurrency-ep7-lock-free-structures-and-channels-for-scalable-rust-code.html</link><pubDate>Thu, 05 Dec 2024 00:00:00 +0000</pubDate><guid>https://www.ardanlabs.com/blog/2024/12/fearless-concurrency-ep7-lock-free-structures-and-channels-for-scalable-rust-code.html</guid><description>&lt;h3 id="introduction"&gt;Introduction:&lt;/h3&gt;&#10;&lt;p&gt;Welcome to Episode 7 of the Fearless Concurrency in Rust series! In this final episode, we explore advanced concurrency techniques that enable efficient, scalable, and robust multithreaded applications in Rust. The focus is on leveraging tools like lock-free data structures, channels for thread communication, and strategies for safely managing shared resources in complex systems. These approaches ensure developers can push the limits of Rust’s concurrency model while maintaining safety and performance.&lt;/p&gt;</description></item><item><title>Fearless Concurrency Ep.6: Understanding Rust ARC for Efficient Multithreading</title><link>https://www.ardanlabs.com/blog/2024/11/fearless-concurrency-ep6-understanding-rust-arc-for-efficient-multithreading.html</link><pubDate>Thu, 21 Nov 2024 00:00:00 +0000</pubDate><guid>https://www.ardanlabs.com/blog/2024/11/fearless-concurrency-ep6-understanding-rust-arc-for-efficient-multithreading.html</guid><description>&lt;h3 id="introduction"&gt;Introduction:&lt;/h3&gt;&#10;&lt;p&gt;Welcome to Episode 6 of the Fearless Concurrency in Rust series! In this episode, we explore the powerful concept of ARC (Atomic Reference Counting) and its critical role in managing shared resources in multithreaded Rust programs. By leveraging ARC, developers can safely share ownership of data across threads without relying on a traditional garbage collector, enabling efficient, flexible, and scalable concurrency.&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;&lt;strong&gt;What is ARC?:&lt;/strong&gt; Understanding Atomic Reference Counting as a lightweight, manual garbage collection system.&lt;/p&gt;</description></item><item><title>Fearless Concurrency Ep.5: Ensuring Memory Safety with Mutexes and RwLocks in Rust</title><link>https://www.ardanlabs.com/blog/2024/11/fearless-concurrency-ep5-ensuring-memory-safety-with-mutexes-and-rwlocks-in-rust.html</link><pubDate>Fri, 08 Nov 2024 00:00:00 +0000</pubDate><guid>https://www.ardanlabs.com/blog/2024/11/fearless-concurrency-ep5-ensuring-memory-safety-with-mutexes-and-rwlocks-in-rust.html</guid><description>&lt;h3 id="introduction"&gt;Introduction:&lt;/h3&gt;&#10;&lt;p&gt;Welcome to Episode 5 of &lt;em&gt;Fearless Concurrency in Rust&lt;/em&gt;! In this episode, Herbert Wolverson dives into advanced concurrency tools, focusing on &lt;code&gt;RwLock&lt;/code&gt; for managing simultaneous reads and writes and the powerful concept of interior mutability. These tools provide developers with greater control over data sharing in multithreaded environments, enabling them to optimize for both performance and code simplicity in Rust.&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;&lt;strong&gt;Read-Write Locks (&lt;code&gt;RwLock&lt;/code&gt;):&lt;/strong&gt; Manage concurrent read and write access efficiently.&lt;/p&gt;</description></item><item><title>Transitioning from C and C++ to Rust: A Beginner’s Guide</title><link>https://www.ardanlabs.com/blog/2024/10/transitioning-from-c-and-c++-to-rust.html</link><pubDate>Tue, 29 Oct 2024 00:00:00 +0000</pubDate><guid>https://www.ardanlabs.com/blog/2024/10/transitioning-from-c-and-c++-to-rust.html</guid><description>&lt;h3 id="introduction"&gt;Introduction:&lt;/h3&gt;&#10;&lt;p&gt;As you embark on the journey from C or C++ to Rust, you&amp;rsquo;ll discover a world of exciting possibilities. Rust&amp;rsquo;s emphasis on safety, concurrency, and performance can significantly enhance your programming toolkit. This beginner&amp;rsquo;s guide on transitioning from C and C++ to Rust will provide a structured approach to making that transition, addressing essential concepts and practical applications. Let’s dive in!&lt;/p&gt;&#10;&lt;h3 id="step-1-understanding-rusts-ownership-model"&gt;Step 1: Understanding Rust’s Ownership Model&lt;/h3&gt;&#10;&lt;p&gt;&lt;strong&gt;Concept Overview:&lt;/strong&gt;&#10;Rust’s ownership model is its most distinctive feature. Unlike C and C++, where you have pointers and manual memory management, Rust uses a system of ownership with rules that the compiler checks at compile time.&lt;/p&gt;</description></item><item><title>Fearless Concurrency Ep.4: Understanding Mutexes and Thread Safety in Rust</title><link>https://www.ardanlabs.com/blog/2024/10/fearless-concurrency-ep4-understanding-mutexes-and-thread-safety-in-rust.html</link><pubDate>Fri, 25 Oct 2024 00:00:00 +0000</pubDate><guid>https://www.ardanlabs.com/blog/2024/10/fearless-concurrency-ep4-understanding-mutexes-and-thread-safety-in-rust.html</guid><description>&lt;h3 id="introduction"&gt;Introduction:&lt;/h3&gt;&#10;&lt;p&gt;Welcome to Episode 4 of Fearless Concurrency in Rust! In this episode, we explore how Rust’s ownership and borrowing rules impact multithreaded programming, focusing on the complexities of managing memory in a concurrent environment. We’ll break down how Rust&amp;rsquo;s strict borrowing and ownership model ensures safety and prevents common pitfalls like data races and undefined behavior, making it an ideal choice for building reliable multithreaded applications.&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;&lt;strong&gt;Thread Safety and Ownership:&lt;/strong&gt; Managing variables across threads using Rust’s ownership rules.&lt;/p&gt;</description></item><item><title>Fearless Concurrency Ep.3: Managing Threaded Programs and Data Races in Rust</title><link>https://www.ardanlabs.com/blog/2024/10/fearless-concurrency-ep3-optimize-rust-code-with-scoped-threads-&amp;-rayon.html</link><pubDate>Thu, 10 Oct 2024 00:00:00 +0000</pubDate><guid>https://www.ardanlabs.com/blog/2024/10/fearless-concurrency-ep3-optimize-rust-code-with-scoped-threads-&amp;-rayon.html</guid><description>&lt;h3 id="introduction"&gt;Introduction:&lt;/h3&gt;&#10;&lt;p&gt;Welcome to Episode 3 of the Fearless Concurrency series! In this episode, Herbert explores advanced threading techniques in Rust, focusing on scoped threads and the Rayon library to help developers build more efficient and parallelized applications. This episode is packed with practical insights on when and how to use different threading models to optimize performance and handle complex workloads.&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;&lt;strong&gt;Scoped Threads:&lt;/strong&gt; Ensuring safe access to shared data with guaranteed lifetimes for concurrent threads.&lt;/p&gt;</description></item><item><title>Fearless Concurrency Ep.2: Managing Threaded Programs and Data Races in Rust</title><link>https://www.ardanlabs.com/blog/2024/09/fearless-concurrency-ep2-managing-threaded-programs-and-data-races-in-rust.html</link><pubDate>Thu, 26 Sep 2024 00:00:00 +0000</pubDate><guid>https://www.ardanlabs.com/blog/2024/09/fearless-concurrency-ep2-managing-threaded-programs-and-data-races-in-rust.html</guid><description>&lt;h3 id="introduction"&gt;Introduction:&lt;/h3&gt;&#10;&lt;p&gt;Welcome to Episode 2 of the &lt;em&gt;Fearless Concurrency in Rust&lt;/em&gt; series! In this episode, Herbert Wolverson dives into the fundamentals of threading in Rust, demonstrating how to use Rust’s threading capabilities effectively while maintaining safety. The focus is on using &lt;code&gt;std::thread&lt;/code&gt; to spawn threads, preventing data races, and ensuring efficient, reliable multithreaded execution.&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;&lt;strong&gt;Creating Threads in Rust:&lt;/strong&gt; How to spawn and manage operating system threads using &lt;code&gt;std::thread::spawn&lt;/code&gt;.&lt;/p&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;&lt;strong&gt;Handling Data Races:&lt;/strong&gt; Rust&amp;rsquo;s borrow checker and ownership system preventing unsafe data access across threads.&lt;/p&gt;</description></item><item><title>Fearless Concurrency Ep.1: Rust's Approach to Safe and Manageable Multithreading</title><link>https://www.ardanlabs.com/blog/2024/09/fearless-concurrency-ep1-rusts-approach-to-safe-and-manageable-multithreading.html</link><pubDate>Thu, 12 Sep 2024 00:00:00 +0000</pubDate><guid>https://www.ardanlabs.com/blog/2024/09/fearless-concurrency-ep1-rusts-approach-to-safe-and-manageable-multithreading.html</guid><description>&lt;h3 id="introduction"&gt;Introduction:&lt;/h3&gt;&#10;&lt;p&gt;In Episode 1 of the &lt;em&gt;Fearless Concurrency in Rust&lt;/em&gt; series, Herbert Wolverson introduces the foundational concept of threads in programming, tracing their origins and evolution while demonstrating how Rust handles concurrency in a safer, more manageable way. He explores the history of threads and their role in enabling programs to perform multiple tasks simultaneously, comparing Rust&amp;rsquo;s threading model with traditional approaches in C++ and Go.&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;&lt;strong&gt;Thread Basics and History:&lt;/strong&gt; Understanding how threads function within operating systems and their development over time.&lt;/p&gt;</description></item><item><title>Categorizing Data with Large Language Models in Rust</title><link>https://www.ardanlabs.com/blog/2024/07/categorize_data_large_language_model_rust.html</link><pubDate>Tue, 06 Aug 2024 00:00:00 +0000</pubDate><guid>https://www.ardanlabs.com/blog/2024/07/categorize_data_large_language_model_rust.html</guid><description>&lt;h3 id="introduction"&gt;Introduction&lt;/h3&gt;&#10;&lt;p&gt;&lt;a href="https://libreqos.io/"&gt;LibreQoS&lt;/a&gt; is an open source project for monitoring and providing quality-of-experience for Internet Service Providers (ISPs) and large networks. It runs as a &amp;ldquo;middle-box&amp;rdquo;, monitoring traffic that passes through it. It recently gained the ability to track individual &lt;em&gt;data flows&lt;/em&gt; - connections between two endpoints. It&amp;rsquo;s also my favorite Open Source project, to which I contribute regularly.&lt;/p&gt;&#10;&lt;p&gt;Public Internet IP addresses belong to an ASN - an Autonomous System Number. An ASN is a unique number that identifies a network on the Internet. Tracking flows allows you to see which ASNs your users are connecting to, how much data is flowing, and monitor the quality of the connection.&lt;/p&gt;</description></item><item><title>Ep. 6: Exploring Concurrency Pitfalls: Rust vs. C++ and Go</title><link>https://www.ardanlabs.com/blog/2024/05/exploring-concurrency-pitfalls-rust-vs-c-and-go-ep-6.html</link><pubDate>Mon, 20 May 2024 00:00:00 +0000</pubDate><guid>https://www.ardanlabs.com/blog/2024/05/exploring-concurrency-pitfalls-rust-vs-c-and-go-ep-6.html</guid><description>&lt;h3 id="introduction"&gt;Introduction:&lt;/h3&gt;&#10;&lt;p&gt;Join Herbert in an insightful discussion on concurrency, where he tackles the complexities of data races and how various programming languages address them:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;Understand the crucial role of recognizing data races in concurrent programming and their potential impacts.&lt;/p&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;See practical examples illustrating the chaos caused by data races and learn how Rust&amp;rsquo;s compiler prevents such issues, ensuring program stability.&lt;/p&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;Explore Rust&amp;rsquo;s unique features like null pointer avoidance and reliable error handling, which enhance safety and reliability in concurrent programming tasks.&lt;/p&gt;</description></item><item><title>Ep. 5: Rust Safe at any Speed: Clearly Indicating Intent</title><link>https://www.ardanlabs.com/blog/2024/05/rust-safe-at-any-speed-clearly-indicating-intent-ep-5.html</link><pubDate>Mon, 13 May 2024 00:00:00 +0000</pubDate><guid>https://www.ardanlabs.com/blog/2024/05/rust-safe-at-any-speed-clearly-indicating-intent-ep-5.html</guid><description>&lt;h3 id="introduction"&gt;Introduction:&lt;/h3&gt;&#10;&lt;p&gt;Delving into the intricate realm of type coercion, Herbert&amp;rsquo;s insights offer invaluable guidance for Rust developers grappling with the complexities of data type conversions:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;Learn the art of clearly indicating intent in code, a crucial skill for enhancing readability and maintainability in Rust projects.&lt;/p&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;Explore Rust&amp;rsquo;s meticulous approach to data mutability, leveraging features like &lt;code&gt;&amp;amp;mut&lt;/code&gt; references to uphold program integrity and prevent unintended modifications.&lt;/p&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;Discover how embracing Rust&amp;rsquo;s principles of clarity and safety empowers developers to craft robust and reliable codebases, ensuring long-term success in software development endeavors.&lt;/p&gt;</description></item><item><title>Ep. 4: Type Coercion in Rust: Ensuring Safety and Preventing Data Loss</title><link>https://www.ardanlabs.com/blog/2024/05/type-coercion-in-rust-ep-4.html</link><pubDate>Fri, 03 May 2024 00:00:00 +0000</pubDate><guid>https://www.ardanlabs.com/blog/2024/05/type-coercion-in-rust-ep-4.html</guid><description>&lt;h3 id="introduction"&gt;Introduction:&lt;/h3&gt;&#10;&lt;p&gt;Delving into the intricate realm of type coercion, Herbert&amp;rsquo;s insights offer invaluable guidance for Rust developers grappling with the complexities of data type conversions:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;Gain insights into the nuances of type coercion, a fundamental aspect of programming languages, and its potential pitfalls, drawing parallels with numerical computation surprises.&lt;/p&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;Explore how Go and Rust tackle inadvertent type coercion, prioritizing program integrity by making it challenging to assign values between incompatible types.&lt;/p&gt;</description></item><item><title>Ep. 3: Ensuring Data Integrity in Rust: Battling Overflow and Underflow</title><link>https://www.ardanlabs.com/blog/2024/29/ensuring-data-integrity-in-rust-ep-3.html</link><pubDate>Mon, 29 Apr 2024 00:00:00 +0000</pubDate><guid>https://www.ardanlabs.com/blog/2024/29/ensuring-data-integrity-in-rust-ep-3.html</guid><description>&lt;h3 id="introduction"&gt;Introduction:&lt;/h3&gt;&#10;&lt;p&gt;Delving into the critical issues of overflow and underflow, Herbert&amp;rsquo;s insights offer valuable takeaways for Rust developers:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;Rust&amp;rsquo;s static analysis capabilities enable early detection and prevention of overflow and underflow errors, allowing developers to address potential issues before they manifest in runtime environments.&lt;/p&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;Through Rust&amp;rsquo;s emphasis on safety and correctness, developers can leverage built-in mechanisms to handle overflow and underflow situations gracefully, reducing the likelihood of software crashes and unexpected behavior.&lt;/p&gt;</description></item><item><title>Ep. 2: Mastering Memory Safety: Rust's Defense Against Use After Free &amp; Use After Move</title><link>https://www.ardanlabs.com/blog/2024/22/mastering-memory-safety-ep-2.html</link><pubDate>Mon, 22 Apr 2024 00:00:00 +0000</pubDate><guid>https://www.ardanlabs.com/blog/2024/22/mastering-memory-safety-ep-2.html</guid><description>&lt;h3 id="introduction"&gt;Introduction:&lt;/h3&gt;&#10;&lt;p&gt;Exploring the critical issues of &amp;ldquo;use after free&amp;rdquo; and &amp;ldquo;use after move,&amp;rdquo; Herbert’s insights offer a valuable understanding to Rust developers:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;Rust&amp;rsquo;s ownership system acts as a powerful safeguard against memory safety issues like &amp;ldquo;use after free&amp;rdquo; and &amp;ldquo;use after move,&amp;rdquo; ensuring code correctness at compile time.&lt;/p&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;By understanding the risks associated with these memory management pitfalls, Rust developers gain deeper insights into crafting more secure and reliable software, leveraging Rust&amp;rsquo;s robust memory handling mechanisms.&lt;/p&gt;</description></item><item><title>Ep. 1: Defending Against Memory Breaches: Exploring Rust and Go's Safety Mechanisms</title><link>https://www.ardanlabs.com/blog/2024/15/defending-against-memory-breaches-exploring-rust-and-go-safety-mechanisms-ep-1.html</link><pubDate>Mon, 15 Apr 2024 00:00:00 +0000</pubDate><guid>https://www.ardanlabs.com/blog/2024/15/defending-against-memory-breaches-exploring-rust-and-go-safety-mechanisms-ep-1.html</guid><description>&lt;h3 id="introduction"&gt;Introduction:&lt;/h3&gt;&#10;&lt;p&gt;Rust&amp;rsquo;s memory safety features are advantageous to Rust developers because they:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;Ensure robust protection against buffer overflows and underflows, enhancing the reliability and security of software.&lt;/p&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;Empower developers to manage type coercion effectively, promoting code reliability and safety while facilitating safe type conversions.&lt;/p&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;Provide confidence in writing concurrent code by enforcing strict mutability rules and synchronization, thereby preventing data race issues and ensuring code correctness and efficiency.&lt;/p&gt;&#10;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;&lt;img src="../../../images/blog/rust-safe-at-any-speed.jpg?v=1" alt="" width="1123" height="379" loading="lazy" decoding="async"&gt;&lt;/p&gt;&#10;&lt;p&gt;With these memory safety features deeply integrated into Rust&amp;rsquo;s design, developers can build more reliable, secure, and efficient software, spanning various aspects of memory management, type handling, and concurrent programming paradigms.&lt;/p&gt;</description></item><item><title>Rust Programming Language: Simple Game</title><link>https://www.ardanlabs.com/blog/2023/03/rust-programming-language-simple-game.html</link><pubDate>Wed, 08 Mar 2023 00:00:00 +0000</pubDate><guid>https://www.ardanlabs.com/blog/2023/03/rust-programming-language-simple-game.html</guid><description>&lt;p&gt;&lt;strong&gt;with Cheikh Seck&lt;/strong&gt;&lt;/p&gt;&#10;&lt;h3 id="introduction"&gt;Introduction&lt;/h3&gt;&#10;&lt;p&gt;This is the first in a series of posts that will explore the Rust programming language. I am going to take the same approach I did with Go and write little programs that explore the different features of the language. Before I begin that work, I thought it would be fun to write a program that does something fun.&lt;/p&gt;&#10;&lt;p&gt;In this post and my first ever Rust program, I’m going to use a Rust library called &lt;a href="https://github.com/amethyst/bracket-lib"&gt;bracket-lib&lt;/a&gt; that provides a cross-platform terminal emulator. I will use this library to build a simple game window that will allow me to animate a box that can be moved up, with gravity causing it to move back down.&lt;/p&gt;</description></item></channel></rss>