Meet Redox, a Unix-Like Operating System Written in Rust
Today's Issue: Rust-powered OS, Master Rust with CodeCrafters, and Nine Rules for Elegant Rust Library APIs
Hello Rustacean! Welcome to another edition of the Rust Bytes newsletter. In this issue, we'll shine a spotlight on an amazing Rust project, present our spot-the-bug challenge, and share some incredible links of the week.
Welcome to Issue 22!
Exciting news! Rust Bytes is transitioning to a bi-weekly schedule. Read More About the Change.
The Main Thing
Redox
Redox is a Unix-like operating system written entirely in the Rust programming language, offering a unique blend of clean modern design and classic functionality.
The Bits That Make Redox Tick:
Redox prioritizes security and flexibility with its modular microkernel architecture.
Rust-powered reliability with memory safety guarantees coupled with impressive stability and resilience against crashes.
Redox offers both a graphical adventure with Orbital and a classic Unix command line vibes.
Redox’s POSIX compliance guarantees seamless integration with existing applications.
And the best part? Redox is open-source on Gitlab.
Challenge: Rust Quiz
What will be the output?
A. [1, 2, 3, 5, 5]
B. [1, 2, 3, 2, 2]
C. [1, 2, 3, 0, 0]
Project Spotlight
CodeCrafters: Practice Writing Complex Software
Ever feel like you're wrestling with the Rust compiler and the borrow checker? We've all been there!
CodeCrafters makes mastering Rust easier with interactive and guided courses.
You will learn by doing, building actual applications that cement your understanding.
Through this practical experience, the nuances of ownership and borrowing will become second nature.
Here's what's in it for you:
Focus on practical applications, no more toy problems – get your hands dirty by building real-world applications that matter.
Learn from Rust experts and gain invaluable insights from seasoned Rust experts, accelerate your learning with personalized peer code reviews and feedback.
Push your limits to build projects that challenge you beyond the basics and into production-ready Rust applications.
Join a thriving community and connect with passionate engineers from influential companies (Cloudflare, Apple, Coinbase, Stripe, Microsoft, etc.)
Get a special 40% discount when you Sign Up today. [sponsored]
Awesome links of the week 🔗
Rust v1.78.0 is here, bringing diagnostic superpowers, safer unsafe code, and perfectly aligned slices.
Allen Wyma interviewed Orhun Parmaksiz about
ratatoulieratatui - TUI library used to create beautiful console-based applications in Rust. 🎙️Carl Kadie’s "Nine Rules for Elegant Rust Library APIs," is a must-watch for Rust library authors aiming for user-friendly library design. 📹
Daniel Stenberg aka CURL sorcerer gave a talk on the “Rust in Production” podcast highlighting integration of Rust modules in CURL. 🎙️
Niko Matsakis wrote Unwind considered harmful?
Joshua Wuyts argues that tasks are the wrong abstraction for parallel async execution and concurrent async execution.
Matthias Endler wrote about The State of Async Rust: Runtimes.
Forget fancy chess apps, Thomas Mauran built chess-tui - a terminal chess game which will leave you saying "checkmate" faster than you can type "en passant."
Shubhankar Trivedi wrote a tutorial on converting images to pixelated ASCII art beauty in your terminal.
Matt Palmer wrote The Mediocre Programmer's Guide to Rust.
Challenge: Solution
Correct Answer:
B. [1, 2, 3, 2, 2]
The resize is a method available on the Vec type in Rust. It allows you to dynamically adjust the size of a vector by specifying the desired new length and the value to fill in any newly added elements.
The resize method takes two arguments:
1. New Length: This specifies the desired number of elements in the vector after resizing. In this case, it's set to 5.
2. Value: This specifies the value to fill in the newly added elements. Here, it's set to 2.
In our scenario above resize adds the specified number of elements 5 with the provided value 2 to the end of the vector. Since the original vector has 3 elements, resize adds two new elements with the value 2, resulting in the final vector: [1, 2, 3, 2, 2].
You can run the code on Rust Playground.
Before You Go
To support the newsletter:
❤️ Recommend the newsletter to your friends: it really helps.
💸 Sponsor the newsletter.
🤳 Check us out on our socials: X, Rustaceans Publication.
📨 Contact us through rustaceanseditors@gmail.com feedback is welcome.
That's all for now, Rustaceans! Until next issue, have a productive week ahead.