🦀 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
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 🧵👇
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
🧵👇
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
🧵👇
⛔ 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 📤
⛔ 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 📤
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...
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...
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 🧵👇
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 🧵👇
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
🧵👇
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
🧵👇
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... 🦋 🦀
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... 🦋 🦀
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 🧵👇
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 🧵👇
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 🧵👇
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 🧵👇
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 🧵👇
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 🧵👇
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 🧵👇
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 🧵👇
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 🧵👇
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 🧵👇
Procedural Macros bsky.app/profile/ioli...
Organizing Larger Projects
bsky.app/profile/ioli...
Writing a simple CLI
bsky.app/profile/ioli...
Any and downcasting
bsky.app/profile/ioli...
👉 Subscribe to the email newsletter: forms.gle/cF4Y61JNJ5kJ...
Procedural Macros bsky.app/profile/ioli...
Organizing Larger Projects
bsky.app/profile/ioli...
Writing a simple CLI
bsky.app/profile/ioli...
Any and downcasting
bsky.app/profile/ioli...
👉 Subscribe to the email newsletter: forms.gle/cF4Y61JNJ5kJ...
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 🧵👇
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 🧵👇
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 🧵👇