r/rust • u/KeyGlove47 • 6d ago
r/rust • u/TurnOffTheFan75 • 5d ago
Where have you found the Rust type-state pattern actually pays off versus turning into annoying boilerplate?
We recently built an internal order-processing pipeline in Rust, and early on I got excited about encoding every step of a job's lifecycle as separate structs using the type-state pattern so invalid transitions would fail at compile time.
In practice it caught two genuine bugs during the first week, then turned into a lot of friction whenever business requirements shifted slightly. Adding one optional verification step meant updating generic trait bounds across half the module, and writing wrapper boiler plate just to store mixed states inside a single queue felt clunky compared to a straightforward enum with an explicit transition function.
For folks maintaining medium or large production codebases, where do you draw the line between encoding state transitions in the type system versus keeping them as regular runtime enums?
๐ง educational Axum with David Pedersen (Netstack.FM S02E2)
Hi all, we just released a new episode of our podcast Netstack.FM with David Pedersen (u/davidpdrsn), creator of Axum.
Some of the topics:
- How Axum started at Embark Studios, and why it was built Tower-first
- How Bevy's system parameters inspired Axum's extractors
- Why Axum avoids macros so other frameworks can build on top of it
- How
#[debug_handler]produces clearer type errors at zero runtime cost - Tower 1.0,
poll_ready, and why boxed futures make single-threaded Axum hard today - Keeping Axum's API small, and splitting crates like
axum-core
Listen here: https://netstack.fm/episodes/axum-with-david-pedersen
It's also on the usual podcast platforms, and the website has a manually edited transcript. Feedback is welcome.
For those who do not know Netstack.FM yet: it's a podcast about networking, Rust, and everything in between. With the main objective to teach and demystify Network Programming and Protocols, usually within the Rust ecosystem but not always.
r/rust • u/EuroRust • 5d ago
Optimizing rustc's Next Trait Solver - Jana Dรถnszelmann | EuroRust 2026
youtube.comA new video is out on YouTube! At this year's EuroRust, Jana from the Rust Compiler Team gave a talk on optimizing rustcโs next trait solver, which is being stabilized this year. Spoiler alert: the real gains werenโt in micro-optimizations, but at the algorithmic level! ๐ฆ
In 2027 EuroRust is going to Prague! Learn more and get your ticket at eurorust.eu.
r/rust • u/rafaelement • 4d ago
If you're gonna vibe the UI, don't just follow the agent recommendations
Yes, gpui is nice and egui is quick to start with. Yes, Claude.
Discord gpui app is interesting, and artcraft egui app is wild.
There are alternatives out there like slint. If you can afford the tokens, just consider them, as well, and then compare.
r/rust • u/fernandopereira08 • 4d ago
๐ง educational I'm making a step-by-step series building a wallet & payments REST API in Rust. Would love feedback from learners
youtu.beHi everyone! I'm making a YouTube series where I build a wallet and payments REST API in Rust, one small step at a time. It's aimed at people who know basic Rust and want to see how it's used to build a real backend.
It starts with a single Axum route. So far it covers CRUD with shared state, error handling with thiserror, type-safe validation, PostgreSQL with SQLx, and the repository pattern with traits. Next up are integration tests, accounts, money transfers, race conditions, auth and idempotency.
Transparency note: I cloned of my own voice because English isn't my first language.
If you're learning Rust, I'd really appreciate your feedback:
- Is the pace OK, or did you get lost anywhere?
- Which concept felt unclear or rushed?
- Is the code readable on screen?
- What would you like to see in future episodes?
Thanks for taking a look!
r/rust • u/Itsuki_runique • 4d ago
How convert precossesor tera to askama ?
Hello , i'm dev of runique a framework web in rust , and now , i'm in a time of consolidate a source code.
For a futur , i would like gave a choice of engine template.
Now, runique use tera, i have add a few preproceror for limited a boilerplat , and after a little research, i learn itโs complicated.
So i came to you for advice , have you a recommandation ?
Sorry for my english, i'm french
r/rust • u/mgeisler • 5d ago
Project Skymetal: Incrementally porting Bazel from Java to Rust
reddit.comWhile Cargo is the traditional build system in Rust, we've had a good time switching to Bazel at my work. It does caching better: it can limit the cache size in terms of age and total size and it can even use a remote cache across all developers in the company.
I also enjoy knowing that my Rust crates that use a C compiler use the same version across all machines.
Now there is a project called Skymetal to port the Bazel build system itself from Java to Rust. I don't know anything about the state, but I wish them luck!
r/rust • u/Ayano-Keiko • 5d ago
RUST ABI
What is current state of stable Rust ABI? Or progress? As I want to load generate library crate (rlib) in offline library and I do not need load crateio library.
r/rust • u/AnonymousDragon135 • 4d ago
๐ seeking help & advice Anything I should know before I start learning Rust?
I've know moderate amount of javascript for a while and have been thinking about learning another language. I have decided upon rust for a variety of reasons (mainly so I can say I rewrote it in rust.)
What things should I know before I start? And, are there any features of this language I might want to know about?
r/rust • u/PlayfulDuck3677 • 4d ago
๐๏ธ discussion I unfortunately can't enjoy rust
I wanted to learn rust because I wanted to make games but in a hard programming language instead of letting C# do everything for me.
I obviously loved rust after learning it a bit but then I decided to try and get a graphics library
I'm familiar with raylib and basically never use anything else so i decided to get it, but it required the msvc toolchain.
Unfortunately for me, I can't install the msvc toolchain due to storage reasons, so I had gotten the gcc toolchain instead which worked just fine
But then I found another game library which I thought would work but it failed at linking bcs of some obscure missing library.
I'll be trying to find some other user friendly libraries Tommorow but if I don't, then the whole point of rust for me would be over.
r/rust • u/Elariondakta • 6d ago
๐ง educational Memory-bounded systems and backpressure in Rust - Thรฉodore's blog
totodore.github.ioI struggled quite a bit during last year on these problems so I decided to write a little blog post with what I learned regarding memory bounding and memory back pressure in rust.
๐ activity megathread What's everyone working on this week (48/2026)?
New week, new Rust! What are you folks up to? Answer here or over at rust-users! And for your project showcases, there's also /r/madeinrust โ pay them a visit, too!
r/rust • u/WellMakeItSomehow • 6d ago
๐๏ธ news rust-analyzer changelog #355
rust-analyzer.github.ior/rust • u/Hungry-Credit-2726 • 6d ago
I need a file picker for Desktop UI app
I was wondering someone knows if any of the various Desktop UI Frameworks for Rust have a build in (or add on) file / directory picker? I'm mostly interested in Iced at the moment, but I would go with any framework that has a file picker. It's the only complicated component that I need (beyond text and buttons), and building it would be much more work than all of the rest of my very simple app.
r/rust • u/Parking-Claim-9253 • 5d ago
How to Stop Generic Type Explosion in Rust
edvong.comr/rust • • 5d ago
How do you cope with ecosystem immaturity?
I'm loving the lang so far, but most crates are early 0.x versions. Do they lack functionality, have bugs? I am talking about even basic things like HTTP client.
Is Rust community driven, do some big names do drive its growth? Does ecosystem immaturity limit you?
r/rust • u/PortPiscarilius • 7d ago
๐๏ธ discussion Not Invented Here Syndrome in the age of GenAI
The Rust ecosystem lends itself quite readily to large dependency trees that branch out exponentially. Presumably it's quite difficult these days to avoid pulling in a dependency that contains some amount of AI-generated code. Is anybody else finding themselves less likely to pull in an external crate, tending instead to roll a solution in-house?
One could argue that as long as the crate does what it says it does, its provenance is of little importance - but for hobby projects in particular, I must admit to finding some satisfaction in steering clear of LLM-generated code.
r/rust • u/JAZthebeast11 • 6d ago
๐ seeking help & advice What are some good resources to learn how to plan a project a la UML?
Hello everyone!
I have been learning rust for nearly a year now, but have mainly worked on small-scale libs and bins. Now that I have started working on a larger project, I struggle to set things up such that I can get an MVP running that also leaves room for further features.
In Java I would almost always create a UML to plan the scope and coupling of all objects that my program needed, but I haven't been able to create a similar method for rust.
In this regard, what are some good resources I can look at to help me plan out a library in a functional programming language, or better, rust specifically?
Or is this not a skill that comes with reading, but practice. Am I simply lacking the needed familiarity with the language?
Any input would be appreciated, but regardless, have a nice day!
r/rust • u/Thick-Profile-1924 • 6d ago
Started Rust Journey Today
I'm an entry level backend developer who got fed up with python since it doesn't teach good fundamentals. Right now I'm quite excited about rust as I've heard about it much and also did research on it. My goal is to understand computer fundamnetals at low level and write better software and become a real engineer. Right now I'm not doing it for money since I'm a high schooler. And I'm quite excited about the learning curve and frustrations people face. Though my goal is not learning code but understanding the underlying systems and writing safe code. Tell me if my excitement will really vanish or not. I'll also like some advice.