Olivia 🦀

@iolivia.me

👩‍💻 staff eng 🦀 post a lot about rust and rust gamedev ✍️ wrote https://sokoban.iolivia.me 🔥 blog at https://iolivia.me 🧵 weekly #rustlang threads every Thursday - subscribe here https://forms.gle/Tcm7cAkLt4NF9ZCZ9

One year in, time to reflect on the #rustlang threads! I wrote 44 total threads, many of you read them, and liked them and almost 100 people subscribed to the newsletter! I couldn't be more thankful for this. But unfortunately, I will stop writing these for now. Why? 👇

Olivia 🦀@iolivia.me · 2y ago

Hey all 👋 This year I'll try to stick to Thread Thursdays, which is every Thursday I'll post a thread about #rustlang fundamentals 🦀 My goal is to help you learn 1% more Rust each Thursday, so follow me if you'd like to read them 🦋 Here are some of the best threads so far 🧵👇

🕰️ Async Basics in #rustlang Send, Sync, Future, tokio, Pin, I'm sure you've heard a lot of intimidating terminology when it comes to async Rust, so this thread is about explaining the basics in a simple way. We'll build a transcript generator to understand async/await, Futures 🧵👇

Bild

⛔ Error handling in #rustlang with anyhow and thiserror Error handling in Rust can be a complex topic, especially since a lot of the patterns are different from other languages. Let's explore some basic options and then go deeper into using anyhow and thiserror crates 🧵👇

Bild

Thursday Thread Preview ⛔ Error handling in #rustlang with anyhow and thiserror 👉 In this thread, I’ll break down how to handle errors cleanly and how/when to use Result vs anyhow vs thiserror Stay tuned, coming out Thursday on 🦋 and 📤

#rustlang Thursday Threads recap Organising larger projects w workspaces bsky.app/profile/ioli... Memory layout bsky.app/profile/ioli... Panics bsky.app/profile/ioli... 👉 Subscribe to receive these threads over email 🦋 🦀 forms.gle/vY6zXE21Dkwa...

bsky.app

Olivia 🦀@iolivia.me · 11mo ago

😱 Panic in #rustlang What is a panic in Rust, how should you handle it when it happens and when should you use it intentionally in your code? Let's explore panic in more detail 🧵👇

📁 File IO in #rustlang File system handling is a core building block of using a language effectively, and Rust makes it pretty ergonomic with the std::fs module. Let's take a look at how to use File IO APIs in Rust with a real-world example: a grade manager for students and courses 🧵👇

Bild

🎢 Understanding VecDeque in #rustlang We've looked at Vec and HashMap in previous threads, but what about queue usecases? Let's build a waitlist functionality for our university database and figure out how to use VecDeque 🧵👇

Bild

#rustlang Thursday Threads recap Pattern Matching bsky.app/profile/ioli... State Machines bsky.app/profile/ioli... Panic bsky.app/profile/ioli... 👉 Subscribe to receive these threads over email forms.gle/vY6zXE21Dkwa... 🦋 🦀

forms.gle

Olivia 🦀@iolivia.me · 11mo ago

🧇 Pattern matching in #rustlang Pattern matching like match, if let and while let are powerful control flow constructs in Rust that allow you to compare a value against a series of patterns and execute code based on which pattern matches. Do you know all the matching tricks? Let's find out 🧵👇

🔒 Visibility in #rustlang As projects grow, there's more and more code to organise and maintain. Visibility rules help you create clean APIs, prevent accidental misuse of internal code, and make refactoring safer by clearly defining public interfaces. Let's learn more about it 🧵👇

Bild

😱 Panic in #rustlang What is a panic in Rust, how should you handle it when it happens and when should you use it intentionally in your code? Let's explore panic in more detail 🧵👇

Bild

🧇 Pattern matching in #rustlang Pattern matching like match, if let and while let are powerful control flow constructs in Rust that allow you to compare a value against a series of patterns and execute code based on which pattern matches. Do you know all the matching tricks? Let's find out 🧵👇

Bild

🎓 State Machines in #rustlang Ever wondered how to model something that changes over time like a student’s journey from an applicant to a graduate safely in Rust? How do you stop a student from graduating before they even apply? Let’s explore how to model state machines 🧵👇

Bild

🎡 Memory layout in #rustlang Have you ever wondered how Rust manages memory layout and how structs you create are actually laid out? This is very important in memory constrained usecases, but also useful to know in general. Let's take a look at some examples and optimisations 🧵👇

Bild

🏒 Any and downcasting in #rustlang Have you ever run into the Any trait browsing library code and didn't know what it was for? Or have you found yourself needing to interpret a trait object at runtime into a concrete type? Let's learn about Any and downcasting 🧵👇

Bild

#rustlang Crate Highlight ✨bcrypt ✨ My goto (pun intended) for password hashing. Dead simple to use for secure password storage and verification. It wraps the standard bcrypt algorithm with a rusy API. 📦 Crates:

crates.io

👏 Writing a simple CLI in #rustlang Writing a CLI is a common usecases for rust, and clap is one of the most popular libraries for this. I always found this task a bit intimidating before doing it once, so I figured others might feel the same way. Let’s build a cli for our university db 🧵👇

Bild