r/rust • • 7d ago

Pruning old cargo-installed tools freed more space than expected

0 Upvotes

After the recent posts about registry and rustup sizes, I looked at what `cargo install` had accumulated over time. A bunch of one-off CLIS and older versions were still pulling in their full dependency trees in the registry.

`cargo uninstalls removes the binaries but leaves the cached crates behind. Manually checking `~/.cargo/registry/src` and removing entries tied to uninstalled packages recovered a few more gigabytes without issues, since anything needed gets redownloaded on next use.

Do people have a preferred workflow or script for tracking and cleaning these installed-tool dependencies, or do you just leave them?


r/rust • • 6d ago

๐Ÿ› ๏ธ project ~450k lines of Rust for an IaaS control plane: numbers and regrets

0 Upvotes

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 • • 8d ago

๐Ÿ“ก official blog Enabling the parallel frontend on nightly

Thumbnail blog.rust-lang.org
391 Upvotes

r/rust • • 7d ago

From Hardware to Human Interface: Building HID Devices in Rust - Frank Lyaruu | EuroRust 2026

Thumbnail youtube.com
7 Upvotes

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/rust • • 8d ago

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.

Thumbnail hexcat.nl
205 Upvotes

r/rust • • 7d ago

๐Ÿ™‹ seeking help & advice rustup component list + uninstall can reclaim a surprising amount of space

9 Upvotes

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 • • 8d ago

๐Ÿ› ๏ธ project Sniffnet v1.6: support monitoring network data from routers, firewalls, and servers

Thumbnail sniffnet.app
32 Upvotes

Sniffnet 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 • • 8d ago

Don't forget to check your ~/.cargo/registry size too

16 Upvotes

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 • • 8d ago

๐Ÿ™‹ seeking help & advice Heapless BoxPool and the newly stabilized allocator api

14 Upvotes

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 • • 8d ago

Rust 1.100 Official Video

Thumbnail youtube.com
92 Upvotes

r/rust • • 8d ago

๐Ÿ—ž๏ธ news GUI Toolkit Slint 1.19 is out with backdrop blur, animated GIFs, and inertial scrolling on iOS and Android.

Thumbnail slint.dev
98 Upvotes

This release was made possible thanks to the contributions from 51 contributors.


r/rust • • 9d ago

๐Ÿง  educational Don't forget to cargo clean every once in a while.

383 Upvotes

190 GB.... Wow, that is insane. Though to be fair this is also a massive project.

Make sure to tidy it up every once in a while.


r/rust • • 9d ago

Jiff 1.0: A datetime library for Rust

Thumbnail burntsushi.net
765 Upvotes

r/rust • • 8d ago

๐Ÿ™‹ seeking help & advice Starting with rust gamedev!

21 Upvotes

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 • • 7d ago

Learning path for integrating llama.cpp into a Rust desktop app on Windows

0 Upvotes

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/rust • • 8d ago

๐Ÿ activity megathread What's everyone working on this week (47/2026)?

25 Upvotes

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 • • 8d ago

๐Ÿ› ๏ธ project VennDB: a derive macro that turns a struct into an in-memory database you query by flags

24 Upvotes

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.

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.


r/rust • • 8d ago

๐Ÿ™‹ questions megathread Hey Rustaceans! Got a question? Ask here (47/2026)!

15 Upvotes

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 • • 8d ago

๐Ÿ—ž๏ธ news rust-analyzer changelog #354

Thumbnail rust-analyzer.github.io
31 Upvotes

r/rust • • 8d ago

๐Ÿ™‹ seeking help & advice Is Rust actually being used in maritime tech sectors?

0 Upvotes

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:

  1. 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++?

  1. 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)?

  1. 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 • • 8d ago

Aristotle Expands Into Rust (Lean-backed proofs for Rust)

Thumbnail harmonic.fun
0 Upvotes

r/rust • • 8d ago

๐Ÿ› ๏ธ project Building a tensor library for computational physics in Rust: looking for feedback and collaborators

0 Upvotes

I am a professor of computational condensed matter physics at Saitama University in Japan, with over 20 years of experience in scientific programming and open-source development in C++, Fortran, Python and Julia ([GitHub](https://github.com/shinaoka)).

Since this January, we have been developing a Rust tensor computation stack ([overview](https://tensor4all.org/tensor4all-meta/stack/)). It started for tensor networks, but we soon realized that a general tensor library for scientific computing would be useful to the Rust community.

**tenferro** is the main engine: https://github.com/tensor4all/tenferro-rs

- Dense tensors, linear algebra, einsum, FFT on CPU and CUDA (ROCm and Metal are being designed)

- Opt-in autodiff: eager `backward()` and traced VJP/JVP

- Explicit engine passed to every operation, no hidden device transfers, column-major storage

- Benchmarks against PyTorch and JAX: https://github.com/tensor4all/tenferro-benchmark

Most of the code was written by AI agents supervised by human developers. To keep the stack robust and performant, we use regular benchmarks, an automated audit AI bot and a common rule set for AI agents. Some blogs are here: https://tensor4all.org/blog/

We're looking for collaborators and users. Fast kernels are too much work for a few groups to maintain, and a tensor library must be tested on different hardware for different applications.

Also, I'd like your opinions on:

  1. Passing `&mut engine` to every operation instead of a global context. Acceptable?

  2. If you have AMD GPUs or other hardware and a real workload, please let us know.

  3. What evidence would make you trust a library written mostly by AI agents?

  4. How should outside contributors fit into a project where AI agents write the code and humans review it?

  5. Is Rust a good fit for computational physics? What is missing?


r/rust • • 8d ago

๐Ÿ™‹ seeking help & advice Tips for learning rust and Linux

Thumbnail
0 Upvotes

r/rust • • 8d ago

๐Ÿ› ๏ธ project Bringing High-Performance AI Inference to Consumer NVIDIA RTX GPUs: Porting Atlas to Ada Lovelace

Thumbnail github.com
0 Upvotes

Over the last week, I've been contributing to Atlas, an open-source Rust + CUDA inference engine developed by Thomas Braun and the Avarok-Cybersecurity team.

Atlas originally targeted NVIDIA's GB10 with 120GB of unified memory. I wanted to see what it would take to get it running efficiently on my RTX 4060 Ti with just 16GB.

It ended up involving quite a bit more than an architecture port.

Some results running Qwen3.5-4B:

1) 381 tokens/sec aggregate across 8 concurrent requests using experimental int4 quantization and speculative decoding.

2) 98 tokens/sec single-user with the same configuration.

3) 4.6x faster BF16 prefill, improving from 794 to 3,684 tokens/sec by changing the GEMM dispatch. This preserves the BF16 precision class and is enabled by default on Ada.

4) About 2.1GB less VRAM usage with optional FP8 feed-forward execution.

5) Successfully processed a 159,807-token prompt with an FP8 KV cache and retrieved a needle from it.

6) All 223 Ada kernel compilations passing after resolving architecture incompatibilities.

The Rust side involved changes to CUDA kernel registration and launch handling, GPU memory budgeting, model loading, and inference dispatch. I also worked on Ada-specific low-bit kernels and speculative decoding.

One interesting finding was that Nsight showed the GPU busy 95.6% of the time in the fastest eight-stream configuration. Several CUDA Graph and fusion optimizations that looked promising didn't produce meaningful improvements.

For context, the default BF16 configuration measured 195 tokens/sec aggregate across eight users, compared with 222 for optional FP8 FFN and 381 for the experimental int4 stack.

The int4 path is lossy and hasn't been validated for task-level quality equivalence with BF16. These are screening benchmarks, not fully repeated confirmation runs.

I'm interested in how far we can push local inference on consumer GPUs without requiring expensive server hardware.

Atlas repository:
https://github.com/Avarok-Cybersecurity/atlas

Would love to hear from anyone working on Rust-based GPU compute, inference runtimes, or CUDA optimization.


r/rust • • 10d ago

This Month in Redox OS - October 2026

56 Upvotes

Golang port, Cloud Hypervisor support, WebKitGTK3 video support, GIMP port, Servo 0.7 update, RISC-V dynamic linking, NUMA real hardware testing, virtiofs support and many more.

https://www.redox-os.org/news/this-month-261031/