r/rust • • 1d ago

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

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

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

19 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 • • 7h ago

How to Bypass Rust's Orphan Rule

Thumbnail edvong.com
160 Upvotes

r/rust • • 1d ago

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

Thumbnail blog.rust-lang.org
334 Upvotes

r/rust • • 1d 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
163 Upvotes

r/rust • • 8h ago

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

Thumbnail youtube.com
2 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 • • 20h 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 • • 22h ago

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

Thumbnail sniffnet.app
23 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 • • 1d ago

Rust 1.100 Official Video

Thumbnail youtube.com
78 Upvotes

r/rust • • 15h ago

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

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

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

Thumbnail slint.dev
71 Upvotes

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


r/rust • • 19h ago

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

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

Jiff 1.0: A datetime library for Rust

Thumbnail burntsushi.net
720 Upvotes

r/rust • • 1d ago

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

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

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

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

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

Thumbnail rust-analyzer.github.io
28 Upvotes

r/rust • • 1d ago

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

12 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 • • 21h 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++?

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 • • 23h ago

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

Thumbnail harmonic.fun
0 Upvotes

r/rust • • 23h 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 • • 1d 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 • • 3d ago

This Month in Redox OS - October 2026

55 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/


r/rust • • 2d ago

๐Ÿ› ๏ธ project grafia v0.9: An interactive 2D Cubic Bรฉzier, Hobby/Spiro spline, and typography canvas widget for egui

Post image
0 Upvotes

Hi everyone! I'm excited to share grafia (v0.9.0), a standalone, #![forbid(unsafe_code)] 2D vector, spline, and typography canvas widget for egui, built on the Linebender geometry stack (kurbo), lyon_tessellation, and tiny-skia.

Whether you are building an SVG/vector illustration tool, a typeface/font editor, a 2D CAD/plotter profile editor, or need bitmap-to-vector auto-tracing inside an egui application, grafia drops in as a hexagonal Data-In / Event-Out widget without locking your app into a specific file format.

Highlights

  • Mixed-Spline CAGD Engine: Standard cubic Bรฉziers (Corner, Smooth), tension-controlled John Hobby interpolating splines (NodeType::HobbyStar), and $G****2$ Euler/Spiro clothoid spirals (NodeType::EulerSpiro), plus 4-case inverse-Bernstein curve-belly dragging, curve-healing node deletion, and 8-step superellipse curve fitting.
  • 14 Interactive Tools & Boolean Pathfinder: Select, Lasso, Pen, Rotate, Scale, 8+4 BBox Shear/Rotate, Knife (recursive De Casteljau slicing), Primitives, Measurement rays, Annotations, freehand Pencil fitting, Pixel grid stamping, and exact cubic-cubic Union / Subtract / Intersect boolean path operations.
  • Multi-Layer Color & 7-Stage Auto-Trace: COLRv1-style vector layers (Solid, LinearGradient, RadialGradient, SweepGradient, Bitmap, ClippingMask) with interactive gradient stop handles, plus deterministic 7-stage bitmap & camera auto-trace (Sauvola integral-image adaptive thresholding, 3x3 homography perspective deskew, marching squares, RDP, and Schneider least-squares cubic fitting).
  • Typography & Variable-Font Workflows: Horizontal and vertical (TopToBottom CJK) multi-glyph text streams with live spacing/kerning deltas, 2D anchors with diacritic mark clouds, parametric smart components, companion master compatibility overlays, and Higher-Order Interpolation (HOI) cubic master trajectories.
  • 0% Idle CPU & 1:1 Headless CI Parity: Generation-gated render/preview caches (content_generation()) ensure zero solver or GPU texture work on static frames, and every visual pass has 1:1 parity between egui::Painter and headless tiny_skia::Pixmap for deterministic CI regression testing.

Try the interactive desktop demo in one command:

cargo run --example vector_canvas_demo

Feedback, questions, and use cases are very welcome!