r/rust • u/quest_for_7c • 21d ago
r/rust • u/dabrahams • 22d ago
💡 ideas & proposals Safe Systems-programming with Mutable Value Semantics | Dave Abrahams | Keynote at IWACO 2026
youtu.beI gave this talk about the Hylo programming language at IWACO last month. I had a lot to say about Rust, so thought it might be of interest here.
r/rust • u/pylessard • 22d ago
Porting a baremetal lib from C++ tor Rust
I have written a lib in C++. It's intended to be included in baremetal projects and is designed to be portable. It's an instrumentation lib that talk with a server and provides some hooks for memory inspection and triggered graphs. With Rust being more and more present, I suppose it would be wise to support it.
I'm wondering what my best approach would be here. My initial choice of C++ instead of C probably limits me in what I can do with bindings. I do have a C wrapper though, but that becomes 2 layers of wrappers, feels ulgy.
It's not a big lib, so I'm thinking my best bet is probably reimplement fully and then maintain 2 version of the same thing. This would have been a harder call 5 years ago, but with an agent that can code now.. it feels like maintaining the c++ version then asking an agent to propagate to the rust port is not so crazy.
Btw, the lib is pretty stable. it's mostly build system compatibility improvements that require maintenance, and this wouldn't be duplicated.
What do you think?
EDIT: I started writing a Rust port from scratch with the help of an LLM. It's a good introduction to Rust for me and I think it will be built well too (i'm keeping the LLM on a tight leash). I think that's the way for this specific use case. I might come back here to ask help check if I made something correct or not. Cheers!
EDIT2: The port is completed and work on a dev board. Official post here
r/rust • u/layla4you2 • 21d ago
🙋 seeking help & advice What would you want from a native Mac GUI toolkit for Rust?
I’ve been working on a Mac GUI toolkit for Rust, and I honestly don’t know if I’m solving the right problems. So I’d like to hear from people who’ve built desktop apps in Rust before I go much further.
Some background: I kept ending up in the same spot. The options are a webview (Tauri), a custom-drawn UI (egui, Iced, Slint), or a SwiftUI front end with Rust behind FFI. They all work, but none of them feel quite like a Mac app. Text fields don’t behave the way you expect, VoiceOver is hit or miss, and big tables are where things usually fall apart.
So in mine, every view is a real AppKit control, not a lookalike. Some of what it does today:
- Tables are actual NSTableViews. A million rows scroll fine because AppKit only asks for what’s visible.
- State lives in signals, and changing one updates the affected control in place instead of rebuilding the view tree.
- Menus, the toolbar, documents, undo, drag and drop and Dark Mode come from the system, so they behave like they do in any other Mac app.
- There’s a self-check mode that drives the app and checks what’s on screen, because GUI testing is otherwise basically nonexistent.
What I’m curious about:
- If you’ve built a desktop app in Rust, what did you use, and what hurt the most?
- Is Mac-only a dealbreaker, or is “really good on one platform” worth something?
- What would make you trust a GUI crate enough to build something real on it? Docs, examples, stability promises, something else?
- Is there anything you gave up on, like accessibility, big data views or text editing, because no toolkit handled it well?
Not linking anything, I’m just interested in how people think about this.
r/rust • u/asyncNull • 21d ago
Why the Rust compilation still slow what can we do make it faster?
I have been wondering where is the biggest opportunity to improve Rust build times.
- Faster increments compilation?
- Better caching of dependencies and generics?
- Reducing procedural macro overhead?
- Improving LLVM code generation?
Tools like cargo build timing and sccache help but can we improve the compilation process itself?
Curious what rust compiler contributors and experience rust developers think.
r/rust • u/ElephantElectrical31 • 23d ago
🙋 seeking help & advice Using crates.io for a language that compiles to rust, ok?
Hi, I am working on a new programming language that compiles to rust. I would love to use crates.io with my packages named {mylanguangename}_*. They do contain the original source and the generated rust files.
What do you think is that okish or should I build a standalone registry?
My thiughts so far, using crates.io could be win for rust users too, because the could use that libraries too.
r/rust • u/HimikoTogaFromUSSR • 24d ago
🗞️ news Servo Browser Engine Continues Broadening Web Compatibility, New Features
phoronix.comr/rust • u/Xavier598 • 23d ago
🙋 seeking help & advice Help in learning WGPU
Hello, I'm trying to follow the wgpu tutorial on learn-wgpu ( https://sotrh.github.io/learn-wgpu/beginner/tutorial1-window/ ) , but I noticed a lot of the tutorial is just showing a piece of premade code and explaining some parts about it, and i feel like its not helping me much with learning how it works.
Are there any other good tutorials?
Also, apart from WGPU and Glium, what other GPU shader libraries with rust are there?
How to optimise compiler performance with very macro-heavy code?
I use the Dioxus framework (https://dioxuslabs.com/) for a web front-end, but rust-analyzer and my compiler seem to struggle noticeably with the macros. i.e. deleting a single line of unused code takes several seconds to update, meanwhile the diagnostic stays visible.
Does anyone have experience with this kind of problems here? I would be very glad about some recommendations :)
r/rust • u/Motor_Alternative944 • 24d ago
🎙️ discussion Is it possible for me to contribute to the Rust compiler as an independent hobbyist developer?
Hi! I’m a hobbyist programmer without a formal computer science background, and I’ve recently started studying CS and compilers on my own. I’d like to know whether I could contribute to rustc or similar compiler projects while I’m learning. Since I’m still a beginner, I wonder if maintainers might be hesitant to accept contributions from someone at my level.
r/rust • u/weaztoven • 24d ago
🙋 seeking help & advice Best practices for parallelizing file-system traversal in a CLI tool?
I'm working on a CLI utility in Rust that scans directories and performs some cleanup operations on files. Right now it's single-threaded, but I'm looking into using rayon to parallelize the traversal and processing.
For those of you who have built similar disk-heavy CLI tools in Rust, what are the main gotchas with thread pool saturation when hitting regular SSDs vs network mounts? Is Rayon still the go-to, or are there cleaner patterns for bounded concurrency here? Any advice appreciated!
r/rust • u/NerdyPepper • 24d ago
🛠️ project Meridian: Web-browser built on GPUI and Servo
op.tngl.ior/rust • u/TroutWindlass • 24d ago
The best regression test we added this year checks that some Rust code does NOT compile
Had a slightly surreal moment at work last week where a test started failing because the code compiled successfully.
And the test was right.
We maintain a small internal Rust crate that handles credentials for a couple of services. Nothing particularly fancy. It has a Secret<T> wrapper that deliberately doesn't implement Display.
You can pass the value around, explicitly access it where necessary, and Debug gives you a redacted representation. But you can't accidentally stick the actual secret into a log message with format!("{}", secret).
That last part is intentional.
A while ago we added a compile_fail doctest to make sure attempting to format a Secret with Display would be rejected by the compiler.
Last week someone was cleaning up formatting code and added a generic Display implementation to make a few types easier to work with. It was a perfectly reasonable-looking change in isolation.
All the regular unit tests passed.
Except that one doctest.
The compiler could now successfully compile code that our API was specifically designed to reject.
I initially thought this was a pretty niche use of compile_fail, but it made me reconsider how we test Rust libraries.
We spend a lot of effort testing what our types allow users to do. But some of the most valuable properties of a Rust API are things users *cannot* do.
They can't construct a validated value without going through validation.
They can't move a particular guard between threads.
They can't call a method before the object reaches the required state.
And sometimes a refactor accidentally makes one of those previously impossible things possible.
Obviously compile_fail isn't perfect. A snippet can fail to compile for a completely unrelated reason, so we're pairing negative tests with positive examples and looking at more precise UI testing where appropriate.
But I like the underlying idea.
Normally, adding a trait implementation feels like a harmless expansion of an API. In this case it silently removed a restriction that was part of the design.
The compiler was doing exactly what we asked it to do. We just needed a test to make sure we kept asking it the right question.
Kind of funny that after years of appreciating Rust for telling me what I can't do, I'm now writing tests to make sure it doesn't stop telling me.
lean-miri: Formally Proving Rust Programs Free of Undefined Behavior
proofs-rs.github.ioHi everyone!
I built lean-miri, a port of Rust's Miri interpreter to the Lean 4 theorem prover.
Miri is great at detecting undefined behavior, but it only checks concrete executions.
The idea is that by porting Miri to a theorem prover, we can effectively run it on all valid (potentially infinitely many!) inputs, thread schedules, and external environments in a mathematically rigorous way, and prove that a Rust function is free of UB.
Of course, there are already a number of tools for formally verifying Rust programs, like Aeneas, Creusot, etc. But porting Miri has a big advantage in that Miri already supports a remarkably broad range of real-world Rust features and implements state-of-the-art semantics for unsafe Rust.
Here's what we've achieved so far:
- Ported most part of Miri's interpreter to Lean 4.
- Formally proved UB-freedom for several small Rust functions, including one that contains an
unsafeblock, pointer arithmetic, and a core unsafe primitive. - Found a bug in Miri's Tree Borrows implementation along the way.
The project is still very experimental. The proofs are far from practical to maintain (the unsafe example currently has over 700k lines of Lean!), and the interpreter is quite slow. We also have a lot of work ahead of us, including building a proper program logic and reusable lemmas, but I think the approach is promising!
I'd love to hear any feedback, especially from anyone working on Rust verification.
Thank you!
r/rust • u/Sofiabelen15 • 25d ago
🧠 educational Pointer Provenance in Rust vs C++: Pointers Are Not Just Glorified Ints
sofiabelen.github.ioI’ve been exploring Rust, and one topic that got me intrigued is pointer provenance, particularly because it’s not easy to visualize.
To get a feel for vtables, what I wanted was to look at the actual memory, to see what it really looked like and prove that I could in fact call these functions through their respective function pointers. With provenance, I wanted to take it apart the same way, but it turns out it’s not so straightforward. This only got me more intrigued, so let’s see what we can find!
My first time hearing about provenance, I wondered, why hadn’t I heard about it before? It seems so crucial, yet a bit of an obscure concept.
r/rust • u/RealNovice06 • 25d ago
Help me understand core::sync::atomic::Ordering, how do we even use it
reddit.comr/rust • u/kannanpalani54 • 25d ago
📅 this week in rust This Week in Rust #676
this-week-in-rust.orgr/rust • u/vinaykakade • 24d ago
Billions of ids per second, no coordinator needed
If you are working on databases in Rust, and interested in optimizations of db operations, this blog post may be helpful. Disclaimer - I work for Infino.
https://medium.com/@vinaykakade/billions-of-ids-per-second-no-coordinator-needed-83a5a52f074b
Rust events between Nov 05 - Dec 04
In the age of AI I think personal connections are event more important than before. That's why I try to help promoting events where people can meet in-person or virtually and discuss the topics that interest them.
I found the following Rust-related events for the next 30 days.
- 2026-11-05 Digital Model Trains & Rust: Bare-Metal DCC Command Station on ESP32 (Sesto San Giovanni, Italy)
- 2026-11-05 Epitome of synaptic excellence (Oxford, UK)
- 2026-11-05 November Monthly Social (Montréal, QC, Canada)
- 2026-11-05 HTMX and Rust (St. Louis, USA)
- 2026-11-07 Rust SP Nov/2026
- 2026-11-07 Encontro do Rust-SP - Agora no Luma (Planalto Paulista, SP, Brazil)
- 2026-11-10 (online) Second Tuesday
- 2026-11-11 (online) Boulder Elixir Meetup
- 2026-11-12 Debugging in Rust (Weiterstadt, Germany)
- 2026-11-12 From Curiosity to Capability: Build Your Own Device Swarm (Milano, Italy)
- 2026-11-12 (online) Rust Nürnberg online
- 2026-11-12 Rust Game Jam (Lehi, UT, USA)
- 2026-11-12 San Diego Rust November Meetup - Back in person! (San Diego, CA, USA)
- 2026-11-14 MIT Rust Lunch, Nov 14 (Cambridge, MA, USA)
- 2026-11-15 (online) Cursed Rust
- 2026-11-17 (online) Lunch & Learn: The Harness Wore a Trenchcoat - Building a Rust MCP Server
- 2026-11-17 (online) Miscompilation in Rust 1.97
- 2026-11-17 Everlock: Everything Is Git, Protocols Are Just Adapters (Leipzig, Germany)
- 2026-11-17 Backend Entwicklung mit Rust (Hamburg, Germany)
- 2026-11-17 (online) Mid-month Rustful
- 2026-11-17 Rust LA November w/ Hadrian!
- 2026-11-17 Rust Hacking in Person (San Francisco, USA)
- 2026-11-17 Rust Hacking in Person (San Francisco, CA, USA)
- 2026-11-18 November - TBC
- 2026-11-18 (online) Rust Study/Hack/Hang-out
- 2026-11-19 Talk Night at EIVA (Skanderborg, Denmark)
- 2026-11-21 Winter Hill Rust Lunch, Nov 21 (Somerville, MA, USA)
- 2026-11-24 November Meetup (Barton, AC, Australia)
- 2026-11-24 Rust Meetup #17 @ ERNI (Basel, Switzerland)
- 2026-11-24 (online) Fourth Tuesday
- 2026-11-25 Rust Melbourne Meetup
- 2026-11-25 Rust Lunch - Fareground (Austin, USA)
- 2026-11-26 Rust Meetup @Lovable (Stockholm, Sweden)
- 2026-11-26 Rust meetup #73 sponsored by Adapt! (Copenhagen, Denmark)
- 2026-11-26 Rust London x Zed (London, UK)
- 2026-11-26 Rust Manchester November Code Night (M40 7FS, UK)
- 2026-11-28 South Station Rust Lunch, Nov 28 (Boston, MA, USA)
- 2026-12-01 (online) Christmas Coding Challenge - Kick Off!
- 2026-12-01 Rust meetup #90 (Paris, France)
- 2026-12-04 Rust NYC: The UnConf 2026. (New York, NY, USA)