9 Years Strong! Celebrating Stable Rust's Anniversary!
Today's Issue: Vercel functions now powered with Rust, Introducing Slint, and Rust love in hip-hop form
Hello Rustacean! Welcome to another edition of the Rust Bytes newsletter. In this issue, we'll celebrate Rust’s 9 year since stable release, spotlight an amazing Rust project, challenge you with a Quiz, and share some incredible links of the week.
Welcome to Issue 25!
THE MAIN THING
Rust Turns 9
Nine years ago today (May 15th, 2015), Rust v 1.0 was released, and it's been a wild ride! 🎉 We've grappled with its complexities, celebrated its power, and reported on its journey through countless repos.
To celebrate, let's peek behind the curtain and see how this amazing language is built.
While Rust isn't built by robots (although some might argue the developers are superhuman), Rust is the harmonious result of many talented teams.
Let's meet the key players: 🥁
The core devs are the brainiacs who dream up features like ownership and the borrow checker, then spend nights debugging compiler gremlins (we hope they get enough sleep).
The tooling team are the ones who ensure your code compiles without throwing cryptic error messages (most of the time).
The documentation team translates complex concepts into understandable language, even for those who haven't memorized the Rustonomicon.
The community champions are the glue that holds the community together, making sure everyone feels welcome and supported (even when we ask the same question for the 10th time).
The bug squashers spend countless hours sifting through code, tracking down elusive errors, and making sure your Rust code runs smoothly (except for those pesky user-induced bugs).
So, the next time you compile a Rust program without any issues, raise a glass to these amazing teams! They're the reason Rust is the awesome language it is today, and they deserve all the virtual high fives (and maybe some real-life pizza parties).
CHALLENGE: RUST QUIZ❓
What is the output of this Rust program?
A. The program exhibits undefined behavior
B. The program does not compile
C. The program is guaranteed to output: []
PROJECT SPOTLIGHT 💡
Slint
Ever feel like building a user interface is more trouble than putting together a toddler's toy box? You wrestle with parts, struggle with instructions, and wind up with something a little...off-center.
There's a better way! Introducing Slint, the declarative GUI toolkit that makes building beautiful native user interfaces as easy as following an IKEA manual (almost).
Slint comes with powerful features:
Intuitive design with a simple, straightforward language that even your grandma could understand (assuming your grandma's a coding whiz).
Cross-platform powerhouse whether you're building for desktop, embedded systems, or the web, Slint's got you covered.
Multiple languages, one happy family: Slint plays nicely with Rust, C++, and JavaScript, so developers can code in their comfort zone.
Lightweight and lightning fast to keep your apps svelte and speedy, even on the most lackluster devices.
And the best part? Slint is open-source.
AWESOME LINKS OF THE WEEK 🔗
Saoirse aka Without Boats wrote an interesting article References are like jumps arguing that mutable aliased state is a root cause of many software bugs.
Matthias Endler wrote about Long-term Rust Project Maintenance.
Harvey Seager built You are Merlin - a text adventure game in Rust that compiles to CLI and WASM.
Rust Design Patterns is a collection of Rust programming techniques (anti-)patterns, idioms and guidelines for writing idiomatic code in Rust.
Dan Groshev wrote about Rust actors + ArcMutex: handle with care, discussing how ownership works in Rust and how it interacts with actors.
Jonathan Johnson released kayWAL - an efficient, general purpose WAL implementation for Rust.
Vercel's been on a Rust crusade, and it's finally paying off, Vercel Functions are now faster—and powered by Rust.
Chris Tsang from SeaQL Team wrote a tutorial on building a Redis / Kafka Data Sink in Rust.
Calling all SF Rustaceans! Get ready to hack some Rust in person at the San Francisco Rust Study Group on the 21st of this month.
Dzenan bump this new track In Rust We Trust 0x00 - pure Rust love in hip-hop form!
CHALLENGE: SOLUTION
This question demonstrates two different meanings of ...
In expression position, .. is the syntax for constructing various types of ranges. Here the expression (0, 1, ..) is a tuple with three elements, the third one having type RangeFull.
On the other hand in a pattern, .. is used to mean "any number of elements". So the pattern (.., x, y) matches a tuple with 2 or more elements, binding the second-last one to x and the last one to y.
Coming out of the first line of main, we have x = 1 and y = (..). Thus the value printed is going to be b"066"[..][1].
The expression b"066" is a byte-string literal of type &'static [u8; 3] containing the three ASCII bytes b'0', b'6', b'6'.
When we slice the byte-string with RangeFull we get a dynamically sized slice [u8] of length 3. Next we access element 1 of the slice, which is the byte b'6' of type u8. When printed, we see the decimal representation of the byte value of the ASCII digit 6, which is the number 54.
You can play with the code on Rust Playground.
Attribution: Challenge courtesy of dtolnay, including the insightful explanation!
BEFORE YOU GO 👋
You're our biggest fans, and we love to see it.
Here are a few ways you can help us spread the word:
❤️ Recommend Rust Bytes to your friends: it really helps.
🤳 Check us out on our socials: X, Rustaceans Publication.
📨 Contact us through rustaceanseditors@gmail.com feedback is welcome.
💸 Sponsor the newsletter.
That's all for now, Rustaceans! Until next issue, have a productive week ahead.




