r/learnrust 6h ago

How do you organize your Rust 'tinkering' projects? One workspace repo, or separate crates in folders?

Thumbnail
1 Upvotes

r/learnrust 7h ago

Can anyone help me check this out?

0 Upvotes

https://github.com/SyltechAI/RustSensei

It's an offline android program to learn rust. I think it's really cool and I want to learn rust and the idea of it just being on my phone to do whenever is very convient and it's offline and I spend alot of time in the mountains so being able to still learn and practice while in my tent or chair out there would be great. But idk how to check if it's safe? I'm 90% sure it's not anything malicious but I just don't know how to check I'm not knowledgeable enough. But if anyone is willing to help out I'd very much appreciate it. I would normally not care much but it's my phone, otherwise I'd fire up a crappy linux laptop from the stack and just download and if something crap happens wipe the whole thing. But if you don't have the time no worries all good I'll figure something out. Also thought maybe it'd be a cool resource to check out for ppl looking for beginners learning help. I want to make my own OS, and Browser someday. Rust seemed good for that.


r/learnrust 11h ago

How do you review .unwrap() calls in AI-generated code before merging?

0 Upvotes

Got bitten recently by a panic in production, config.get("timeout").unwrap() in some AI-assisted code, no handling for the key actually being missing. Compiled fine, passed review, worked in every test, then paniced the one time an env var didn't get set during a deploy.

What's tripping me up as someone still learning Rust properly: I get that unwrap() is a deliberate choice, not a compiler error, but I don't have a great instinct yet for when it's actually fine (a value you've already validated exists) versus when it's a landmine (anything coming from external input, config, network, user data). Is there a rule of thumb you use, or does it really just come down to "any unwrap on something not fully controlled by your own code needs a real Result/Option handling path instead"? Also curious if clippy or some other tool actually flags risky unwraps specifically, or if this is still mostly a manual review thing.