r/learnrust • u/Ambitious-Dig7271 • 13h ago
r/learnrust • u/fernandopereira08 • 13h ago
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/learnrust • u/Ambitious-Dig7271 • 1h ago
Suggestions for Rust Course
I am currently learning Rust programming language and want to enroll into a course for better guidance and projects . Someone help me choose the best available course on Udemy.
r/learnrust • u/WaferYield100 • 12h ago
Did an idiomatic solution come to me naturally for the first time?
New rust learner/hobbyist, trying my hand in embedded software. Started with the discovery book, and in it, chapter 7 is a challenge to make an led roulette. Earlier me would have (and have) written a garbled mess of if/else statements, but this time I thought of doing it with a match statement and I'm kinda proud of that... hopefully this is me starting to think idiomatically :-)
The interesting part of the solution: (I know its a simple problem, and the solution isn't that complicated, but a win is a win...) (All feedback is appreciated, on the code, and on rust journey in general)
struct CurrentFrame {
matrix: [[u8; 5]; 5],
pos: (usize, usize),
}
impl CurrentFrame {
fn next_frame(&mut self) {
self.matrix[self.pos.0][self.pos.1] = 0;
match self.pos {
(_,0) => {
if self.pos.0>0 {self.pos.0 -= 1}
else {self.pos.1 += 1}
},
(4,_) => self.pos.1 -= 1,
(_,4) => self.pos.0 += 1,
(0,_) => self.pos.1 += 1,
_ => (),
}
self.matrix[self.pos.0][self.pos.1] = 1;
}
}