Posted on

We’ve got another exciting edition of Rust Trends lined up for you. This week, we’re diving into practical Rust projects like building a DNS server, exploring advanced concepts like sans I/O design with the 9p protocol, and learning how to speed up JSON decoding with the Arrow-rs library. Plus, we’ve got some great community content, from astrodynamics in Rust to switching from Python to Rust insights.

Whether you’re here for new features, project inspiration, or a dose of Rusty goodness, there’s something for everyone. Let’s jump right in!

Building a DNS Server in Rust: Behind the Scenes

Ever wondered what it takes to build a DNS server from scratch? In collaboration with Codecrafters, my latest blog post takes you on a deep dive into creating a DNS server using Rust. This post covers everything from parsing packets to handling requests efficiently, and if you’re up for a challenge yourself, you can try Codecrafters for free!

By using my referral link when signing up, you’ll not only support my content but also get hands-on with awesome coding challenges. Check it out!

Rust’s Next Ergonomic Boost: Async Closures & If/Let While Chains

This week, I stumbled upon a fascinating read: “Socrates is a state machine” on Reddit. The article dives into how Rust’s async/await can be used to build a state machine for the 9p protocol, using a “sans I/O” design.

But what does all this mean? “Sans I/O” is all about keeping protocol logic separate from input/output operations, making your code more flexible and testable. The 9p protocol, originally from Plan 9 OS, is used for networked file systems, think of it like a messenger that helps different systems share files seamlessly.

If you’re into building modular and reusable code, this is a must-read!

Fast Columnar JSON Decoding with Arrow-rs

If you’ve ever felt the pain of slow JSON deserialization in streaming applications, this one’s for you! In their latest article, “Fast columnar JSON decoding”, Arroyo dives into how the arrow-rs library can supercharge performance by using a columnar data format.

By decoding JSON into Arrow batches directly, arrow-rs avoids a lot of overhead, making it up to 2.3x faster than traditional row-based methods. The post also covers practical examples and benchmarks, showing where the real gains come in.

If you’re dealing with high-throughput data or just want a speed boost in your Rust applications, this is a must-read!

Snippets


We are thrilled to have you as part of our growing community of Rust enthusiasts! If you found value in this newsletter, don't keep it to yourself — share it with your network and let's grow the Rust community together.

👉 Take Action Now:

  • Share: Forward this email to share this newsletter with your colleagues and friends.

  • Engage: Have thoughts or questions? Reply to this email.

  • Subscribe: Not a subscriber yet? Click here to never miss an update from Rust Trends.

Cheers, Bob Peters