r/learnrust • u/Fun_Objective7227 • 6h ago
hey there!, i was searching for sober (roblox) alternative that is rewritten in rust
im just interested in this but idk ive failed finding andthing that is roblox rust rewritten
r/learnrust • u/Fun_Objective7227 • 6h ago
im just interested in this but idk ive failed finding andthing that is roblox rust rewritten
r/learnrust • u/Status-Aside-5583 • 20h ago

So , i read the original book ownership chapter it made sense but then i went to brown unverisity and boy i cant wrap my head around the same concept
see this what i know are:
1.when we create a mutable or immutable refernce to the original owner or its value with *
it removes corresponding permissions
2. When we create a reference pointing to another refernce this part i dont understnd like see above ss it says that after we assign z a mutable reference to *y , y and *y both lose write permission if they both lose write permission then how can i be able to reassign y in next step???
This is my own understanding but if u create a immutable refernce to a *y it only removes write from *y and not Y and if u make a immutbale reference to y itself it removes write from both
plus the rest of book has permisson system too so should i forget what i learned al together and focus on main book or is there a way to learn this permisson thing
r/learnrust • u/md_Fahad25624 • 2d ago
I'm a beginner, learning coding newly, my first serious language is Rust. This is my GitHub link, there are some small projects here, I'll be glad to accept reviews.
r/learnrust • u/bodiam • 3d ago
(logo enhanced with AI, but created by my talented 7 year old niece. proof)
Hi all. A lot of people are wondering if it's still worth learning to program now that AI is more than capable of doing this. These people are often the people who already have 10 years of programming experience, and aren't the ones just getting started with things. Also, is it ever worth learning something for the mental challenge? I'd think so, plus it helps to understand what the AI is doing; if it's good code or bad code.
So, with that in mind, I created a small website, https://learnmap.sh, which teaches programming in a wide range of languages. It's inspired by a website I liked a lot myself (https://vimjoyer.com/nixmap/), and a bit by Duolingo. It's mostly focused on beginner programmers, but while I'm an experienced developer myself (20+ years), going through the Rust and Zig tutorials taught me a lot.
Anyway, just wanted to share the site. There's no accounts (all progress is stored locally), there's no banners, no ads, just a small way to contribute some fun weekend project. If you have some feedback, thoughts, you'd like to see anything extra, I'd love to hear your thoughts!
update: the source code is available here, for those interested: https://github.com/learnmapapp/learnmap
r/learnrust • u/Foreign_Career_454 • 3d ago
a cross-platform privacy & vpn app in Rust that routes device internet traffic through itself to talk with Windows networking, firewall, microphone, and camera systems currently have to bypass automatic memory safety checks in some sections. Is there a manual review checklist or any auto testing tool which scans during build & see memory leaks or crashes
r/learnrust • u/More-Reception-2496 • 3d ago
r/learnrust • u/OkBug7820 • 3d ago
Hello, as you might have read from the title, i am new to rust, and being new to rust also means looking for ways to further improve, and one way to do that is to receive feedback, which i am seeking from this subreddit. I've read parts of the rust book and created projects in rust to put my skills to the test. I am currently working on a simple file IO CLI tool (https://github.com/reehanthenew/Simple-file-IO-CLI-tool/tree/main) and im currently proud of my progress. If i could receive some feedback (i accept any forms of feedback) that would be most appreciated. If i could receive more beginner-friendly projects or more learning materials, that would be much more appreciated. If you would like to monitor my growth, feel free to here: https://github.com/reehanthenew?tab=repositories
r/learnrust • u/_mrcrgl • 3d ago
r/learnrust • u/byterider • 4d ago
I wrote this for people who've programmed before but never touched Rust.
Each chapter is a folder you can build on its own and adds one thing: walking a folder, error handling with Result and ?, an arena tree that the borrow checker likes, rayon, atomics for live progress, a squarified treemap, safe delete, duplicate detection, then installers, signing, auto-update and package managers.
At the end you have Roomy, an app people actually use. Feedback on where it gets confusing would help a lot.
https://github.com/pravin/roomy#the-chapters
Please feedback 🙏
r/learnrust • u/No-Elephant-9065 • 4d ago
I’m building a local semantic search desktop app in Rust and planning to change its inference engine from launching `llama-server` as a separate process to calling llama.cpp in-process through its Windows DLL.
I have basic deep learning knowledge and want to understand the full stack behind the setup like how llama.cpp runs models, how its C API and Rust FFI work, how the DLL is built and loaded, how GGUF embedding and multimodal models are handled, how CPU and GPU backends use the hardware, and how to package and distribute the application and its native dependencies reliably.
What documentation, videos, articles, or example projects would you recommend? I’d especially appreciate a sensible order to study them and practical resources that connect the model and hardware concepts to building a working Rust application.
r/learnrust • u/Creative_Concert8682 • 4d ago
hi. i develop using cpp. i want to learn rust to see what the hype is all about and build some systems (core) in rust. what's the best way to learn rust with my bg in cpp? should i learn it from scratch or learn by mapping it to cpp?
r/learnrust • u/dmills_00 • 4d ago
Hi everyone.
I have this bit of code (Extracted from something much larger) that is throwing up an error as follows:
#[derive(Clone, Debug)]
pub enum CutterComp {
CompOff,
LeftFromTool(Option<Expr>),
RightFromTool(Option<Expr>),
}
Then in a structure definition :
#[derive(Debug, Default)]
struct StateUpdate {
.
.
.
radius_compensation: Option<CutterComp>,
.
.
}
Then in an impl of Stateupdate :
fn intepret_block(&mut self) -> Result<(), ErrType> {
.
.
.
if let Some (c) = self.grouped_gcodes[GCodeGroups::GRadiusComp as usize] {
match c.0 {
GCodes::G40 => {
trace!("Cutter compensation off");
self.radius_compensation = Some<CutterComp::CompOff>;
}
GCodes::G41 => {
trace!("Cutter compensation left");
self.radius_compensation = Some<CutterComp::LeftFromTool((self.axis.get(&"d")))>;
}Where the thing blows up with
error: comparison operators cannot be chained
--> src/main.rs:259:52
|
259 | self.radius_compensation = Some<CutterComp::CompOff>;
| ^ ^Any ideas?
Rust usually gets types right almost by magic (Old C hand here), but it seems to think that I have a bool or something.
Rust analyser is saying "expected Option<CutterComp>, found bool" which I do not understand.
r/learnrust • u/EuroRust • 5d ago
Have you ever dreamt of building your own keyboard or game controller? 🎮
At this year's EuroRust, Frank Lyaruu showed how surprisingly accessible it is with Rust. Check out this new talk and start building your own plug-and-play devices! 🦀✨
In 2027 EuroRust is going to Prague! Learn more and get your ticket at eurorust.eu
r/learnrust • u/Foreign_Career_454 • 6d ago
a vpn app in rust facing issue where if corrupt pack arrives worker crashes which is cutting users video call or connection how to design where i can sideline or disregard or discard that packet so users connections doesnt breaks & i dont have to go safety checks for every line.
r/learnrust • u/Kitchen_Truck_6853 • 6d ago
I been learning Rust for about 8 months now and feel pretty comfortable with the basics (ownership, traits, error handling, simple CLIs).
Now I really want to build something a bit more challenging to level up. What projects did you make around this stage that actually taught you a lot maybe something with async, networking, parsers, or a cool TUI? Would love to hear what worked for you!
r/learnrust • u/Ayano-Keiko • 6d ago
I use RustRover IDEA. And the IDEA prompt me an error as No 'main' function found in crate
rust compiler seems treat the library crate as binary crate. And when I add
[lib]
path = "lib.rs"
crate-type = ["cdylib"]I have try both path = "lib.rs" and path = "src/lib.rs". path = "lib.rs" works but cannot load other module like mod1.rs and module/mod.rs in the same directory as lib.rs. And after I remove the [lib]. No 'main'function found error return.
I try `cargo test' and the error message shows
error[E0583]: file not found for module `mod1`
--> src/lib.rs:5:1
|
5 | mod mod1;
| ^^^^^^^^^^^^^
|
= help: to create the module `mod1`, create file "src/lib/mod1.rs" or "src/lib/mod1/mod.rs"
= note: if there is a `mod mod1` elsewhere in the crate already, import it with `use crate::...` instead
error[E0583]: file not found for module `mod2`
--> src/lib.rs:6:1
|
6 | mod mod2;
| ^^^^^^^^^^^
|
= help: to create the module `mod2`, create file "src/lib/mod2.rs" or "src/lib/mod2/mod.rs"
= note: if there is a `mod mod2` elsewhere in the crate already, import it with `use crate::...` instead
error[E0583]: file not found for module `module`
--> src/lib.rs:7:1
|
7 | mod module;
| ^^^^^^^^^^
|
= help: to create the module `module`, create file "src/lib/module.rs" or "src/lib/module/mod.rs"
= note: if there is a `mod module` elsewhere in the crate already, import it with `use crate::...` instead
error[E0425]: cannot find function `my_func` in the crate root
--> src/lib.rs:137:16
|
137 | crate::my_func(
| ^^^^^^^^^^^^^^^^^^^ not found in the crate root
|
help: consider importing this function
|
134 + use crate::lib::my_func;
|
help: if you import `my_func`, refer to it directly
|
137 - crate::my_func(
137 + my_func(
|
error: could not compile `<crate-name>` (bin "crate-name>" test) due to 4 previous errors; 5 warnings emittedr/learnrust • u/larpingoose • 8d ago
My friend needs help to compile a java program and port it to rust for his nokia.
If anyone wants to help him, you can contact him on his discord: roccogiu
r/learnrust • u/Poxi_XD • 8d ago
uhhhh heres the code built it day 2 of learning rust if anything i did is overcomplicated please just comment or create an issue https://github.com/PoxiTheDev/learning
r/learnrust • u/marco-mq • 9d ago
I really like Rust. But build times are one of the few things that really bother me. For one project, we needed to switch off our CI for a while, because every run took 20 minutes and nobody had time yet to set up caching and CI runs got stuck. And my own crate has the same problem.
I maintain mq-bridge, an async crate that moves messages between Kafka, NATS, Postgres, MongoDB, S3, HTTP and more. Every connector is a Cargo feature. Cold dev build of an empty program that depends on it, on an M1:
| - | crates | build | target dir |
|---|---|---|---|
| all features | 534 | 3 min 40 s | 4.7 GB |
| no features | 99 | 18 s | 411 MB |
Release builds take 10-20 minutes per target on GitHub Actions. Splitting into many crates doesn't fix that either: a similar but bigger project that did exactly that takes half an hour to build locally and two on GitHub Actions.
The root of it: Cargo has no way to ship a compiled dependency. Every project compiles every crate from source, again and again, on every machine and every CI runner.
My workaround: you build mq-bridge with no features, and every connector you didn't compile in comes from a prebuilt library at runtime:
mq-bridge = {version = "1.5", default-features = false, features = ["plugin"]}
mq_bridge::plugin::load_installed_plugin("full")?;The library is a 30-35 MB download (brew, conda or a release tarball). I added a dynamic loader that checks availability of API calls on runtime during definition. The slow library build happens once per release in my CI instead of in every project.
But it is a detour. Rust has no stable ABI, so it goes through a C interface. I already had a C library for the Node and Nim packages, otherwise I'd probably have done it differently. And the boundary costs something:
I'd rather not need any of this. Is there a better way I'm missing? How do you keep build times and CI under control for crates with many heavy dependencies?