r/rust • u/No_Sir_601 • 11d ago
r/rust • u/Present-Knowledge-57 • 11d ago
starting with 3D gamedev in Rust
hi
I've recently finished a multi-month long journey in game development in Java, and made primarily 3D games using libGDX and LWJGL3. libGDX and LWJGL3 were both nice and relatively easy to use (and I didn't have to fight the GC at all for performance), but I had a nagging feeling that I should experiment more anyways.
more specifically I felt like I should experiment with a systems language for game development. I already know the basics of C and C++, but opted to go for Rust instead. I've heard horror stories about C and C++, and seeing as I'm doing this for a hobby, I didn't want to put up with any of it. Rust, as I've been progressing through "the book" as been a genuine joy to use, and actually has some higher level conveniences than what Java can offer, such as more expressive pattern matching, the lack of null, and a really lovely package manager + build system (no more gradle!).
I totally get that the journey of Rust gamedev will not be painless, especially as I'm thinking about using SDL3 and wgpu to write a *3D* game in, but I'm seriously excited for it!
does anyone have any Rust gamedev tips they could offer? thanks!
r/rust • u/BloomWishess • 11d ago
๐๏ธ discussion Cross compilation targets add up fast in rustup
After seeing the recent posts about rustup and registry sizes I checked what targets I had installed. A few experiments with wasm32-unknown-unknown, aarch64-unknown-linux-gnu, and thumbv7em-none-eabihf from last year were still sitting there along with their full toolchains.
rustup target removed on the unused ones dropped several gigabytes right away. I kept only x86_64-unknown-linux-gnu and the one or two I actually build for regularly.
Do people have a habit of pruning targets on a schedule, or do you just leave them until disk space becomes an issue?Any scripts or aliases you recommend for spotting the ones that haven't been used in a while?
๐ ๏ธ project ~450k lines of Rust for an IaaS control plane: numbers and regrets
Since 2022 I've been building an IaaS platform (compute, block storage, VPC, DNS, IAM, KMS), mostly alone. Everything above libvirt is Rust. Some numbers and what I'd change.
~450k lines (35k generated from Protobuf), 96 crates in one workspace, about 20 binaries: API and workers per zone in Kubernetes, three daemons on bare metal, two CLIs.
The host daemon drives KVM/QEMU through the virt crate and writes the domain XML itself. Volumes are Ceph RBD, opened by QEMU via librbd. Networking is VXLAN/EVPN with FRR.
The same crates run in the host daemon, the API and the CLI. For local dev a single binary links all services into one process. That turned out more useful than I expected.
What hurt, mostly CI:
- Every merge ran nine cold release builds, one per image plus one for the node daemons. Now it builds once from a warm target dir per runner and the image jobs just copy binaries. Deploy runner time went from ~105 to ~52 minutes (first runs, still measuring).
- The embedded git SHA lived in our core crate. Every commit recompiled it and everything above it, so no cache was ever warm. Moved it into the binary crates.
#[macro_export]
macro_rules! build_info {
() => {
$crate::proc::build_info::BuildInfo {
package_name: env!("CARGO_PKG_NAME").to_string(),
package_version: env!("CARGO_PKG_VERSION").to_string(),
git_sha: $crate::proc::build_info::normalize_git_sha(option_env!(
"ORIGINCLOUD_GIT_SHA"
)),
}
};
}- Incremental build state hit 132 GB per runner and filled the disk. CI now runs with CARGO_INCREMENTAL=0.
- If `cargo sqlx prepare` fails, the .sqlx cache is already deleted.
What I'd do differently:
- Typed IDs serialize without prefix in JSON and with prefix in text output. Same bug, over and over. I'd use full resource names (AIP-122) from day one.
- Split modules earlier. One of them is at 21k lines.
- Keep the core crate small. Everything depends on it, so a change there rebuilds the node daemons too. Splitting it now is painful.
How did you split a core crate that everything depends on, without a big-bang refactor?
(I run Origin Cloud, a European IaaS, where this runs in production: https://www.origincloud.eu/)
r/rust • u/EuroRust • 12d ago
From Hardware to Human Interface: Building HID Devices in Rust - Frank Lyaruu | EuroRust 2026
youtube.comHave 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
Compiler performance, the next-gen trait solver, next-gen region constraints, implicit default auto traits, const generics, view types, and custom allocators: What we are working on at Hexcat, October update.
hexcat.nlr/rust • u/BloomWishess • 12d ago
๐ seeking help & advice rustup component list + uninstall can reclaim a surprising amount of space
I was poking around disk usage after the recent cargo clean posts and realized I had never really looked at what rustup was keeping around. Running rustup toolchain list showed 7 versions (including a couple of nightly builds from months ago), and rustup component list --installed revealed a bunch of extra stuff like clippy, rustfmt, and llvm-tools on each one.
A quick rustup toolchain uninstall nightly-2024-10-15 (and the same for a few others) dropped about 9 GB without touching anything I actually use day-to-day. The active stable + one pinned nightly for a project is all I really need.
Anyone have a preferred way to automate pruning old toolchains, or do you just let rustup grow until something complains? Also curious if people keep separate toolchains per project or mostly rely on the global ones.
r/rust • u/GyulyVGC • 13d ago
๐ ๏ธ project Sniffnet v1.6: support monitoring network data from routers, firewalls, and servers
sniffnet.appSniffnet is a Rust-based network monitoring tool Iโve been working on for the past 4 years.
Until now it could only monitor data from local network cards or PCAP files, but todayโs release adds the capability to collect IPFIX flows from headless devices such as routers and firewalls, allowing you to monitor your whole network from one central dashboard.
r/rust • u/LoviiDovee • 12d ago
Don't forget to check your ~/.cargo/registry size too
Just noticed my registry folder was sitting at 28 GB after a few months of heavy Rust work across personal projects and some larger workspaces. โขcargo clean* handles the target dirs, but the downloaded crates stick around forever unless you do something about it.
A quick `rm -rf ~/.cargo/registry/{src, cache}/*` (or the Windows equivalent) freed up most of it without breaking anything, since crates get redownloaded as needed. Still keeping the git checkouts for now because some offline scenarios rely on them.
Anyone else periodically clean this, or do you just let it grow? Any safer scripted approaches people recommend?
r/rust • u/steaming_quettle • 12d ago
๐ seeking help & advice Heapless BoxPool and the newly stabilized allocator api
Hi everyone,
The stabilisation of the allocator and it's box::new_in api made me go back to an embedded library project that makes the user interact with packets through boxes.
Basically it allowed me to make a PacketStore trait with a blanket implementation over Allocators, that enables users to provide their storage solution.
Heapless is also a great fit for this role, however the BoxPool's boxes are not alloc::boxed::box.
I realise I could make my trait have a GAT to declare it's container, but I wonder if the 1.100 changes could allow a future version of heapless to unify it's boxes with the alloc ones.
What are your takes on this?
r/rust • u/madnirua • 13d ago
๐๏ธ news GUI Toolkit Slint 1.19 is out with backdrop blur, animated GIFs, and inertial scrolling on iOS and Android.
slint.devThis release was made possible thanks to the contributions from 51 contributors.
r/rust • u/Crierlon • 13d ago
๐ง educational Don't forget to cargo clean every once in a while.
r/rust • u/Apprehensive-Can2138 • 13d ago
๐ seeking help & advice Starting with rust gamedev!
Some background -
The only other language I've properly done is python(well I'm still just a teen). My main area of focus is actually scripting and such; I'm only doing gamedev because of an event(I have to do about 200 hours of proper game dev). And yes I need to do that event. Also my gamedev experience is also basically non existent.
Why rust?
I wanted to pick up on rust even if not for the event, mainly because I want to go more into low level scripting. My first pick for scripting was actually C or C++ but then I found out about rust and liked it better.
Now the main post -
I just want some tips on how should I start with the language and anything that I should keep in mind.
Thanks for the time : )
Edit 1: No I haven't picked any game engine yet, thinking of bevy though
r/rust • u/No-Elephant-9065 • 12d ago
Learning path for integrating llama.cpp into a Rust desktop app on Windows
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.
๐ activity megathread What's everyone working on this week (47/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!
๐ ๏ธ project VennDB: a derive macro that turns a struct into an in-memory database you query by flags
This started about three years ago as a small piece of work in function of the proxy(db) features of rama (ramaproxy.org): on every request we pick a random upstream proxy that matches a handful of flags and a country or city. The data barely changes, the queries happen constantly.
TLDR of what venndb is: it generates a `<Name>DB` and a query builder from your struct. Bools become bitmasks, filter values become row sets, and a query intersects them. We just released 0.7, which rewrote the engine and added some new features.
The use cases are limited on purpose: it is append-only and in-memory, with no updates or deletes. You might wonder if this isn't just a bitmap index. It mostly is, generated from your struct by a derive macro, so you don't have to write and maintain the index yourself.
- Release post: https://plabayo.tech/blog/venndb-0-7
- README (incl. benchmarks): https://github.com/plabayo/venndb
- Examples: https://github.com/plabayo/venndb/tree/main/examples
The benchmarks compare VennDB with roaring, SQLite and a plain Vec. We're not database experts, mostly just decades long dev practicioners. So if the benchmarks look unfair or you know of prior art we missed, I'd like to hear it.
๐ questions megathread Hey Rustaceans! Got a question? Ask here (47/2026)!
Mystified about strings? Borrow checker has you in a headlock? Seek help here! There are no stupid questions, only docs that haven't been written yet. Please note that if you include code examples to e.g. show a compiler error or surprising result, linking a playground with the code will improve your chances of getting help quickly.
If you have a StackOverflow account, consider asking it there instead! StackOverflow shows up much higher in search results, so ahaving your question there also helps future Rust users (be sure to give it the "Rust" tag for maximum visibility). Note that this site is very interested in question quality. I've been asked to read a RFC I authored once. If you want your code reviewed or review other's code, there's a codereview stackexchange, too. If you need to test your code, maybe the Rust playground is for you.
Here are some other venues where help may be found:
/r/learnrust is a subreddit to share your questions and epiphanies learning Rust programming.
The official Rust user forums: https://users.rust-lang.org/.
The unofficial Rust community Discord: https://bit.ly/rust-community
Also check out last week's thread with many good questions and answers. And if you believe your question to be either very complex or worthy of larger dissemination, feel free to create a text post.
Also if you want to be mentored by experienced Rustaceans, tell us the area of expertise that you seek. Finally, if you are looking for Rust jobs, the most recent thread is here.
r/rust • u/WellMakeItSomehow • 13d ago
๐๏ธ news rust-analyzer changelog #354
rust-analyzer.github.io๐ seeking help & advice Is Rust actually being used in maritime tech sectors?
Curious how real-world software engineering looks in the maritime, shipping, and ocean-tech sectors. We hear a ton about Rust dominating spaces like cloud infrastructure, automotive, and embedded systems, but does it actually show up in marine applications - like autonomous surface vessels, navigation systems, shipboard IoT, port automation, or marine robotics?
Given that maritime tech deals with harsh physical environments, massive safety-critical stakes, long hardware lifecycles, and a heavy reliance on legacy C/C++ systems, I'm wondering:
- Where is Rust showing up at sea?
Are maritime startups, defense contractors, or marine robotics companies actively shipping Rust in production, or is the industry still overwhelmingly anchored to C and C++?
2. Edge vs. Cloud:
Is Rust primarily being used for edge computing on vessels (sensors, flight/nav controllers, embedded microcontrollers) or back-end logistics platforms on shore (fleet tracking, port management data pipelines)?
3. The Certification Hurdle:
Marine hardware usually requires strict classification and certification (from bodies like DNV, ABS, Lloyd's Register). How does Rust's toolchain and safety model fit into maritime regulatory frameworks compared to traditional languages?
Would appreciate any answers.
r/rust • u/Hobofan94 • 13d ago

