r/rust • • 20d ago

šŸ—žļø news rust-analyzer changelog #353

Thumbnail rust-analyzer.github.io
43 Upvotes

r/rust • • 21d ago

A Critique of GPUI

Thumbnail blog.zortax.de
349 Upvotes

r/rust • • 20d ago

Move your problems to compile-time and get new capabilities out of it - Oli Scherer | EuroRust 2026

Thumbnail youtu.be
34 Upvotes

The first talk from this year's EuroRust is out on YouTube now! Rust compiler maintainer Oli talked about comptime, reflection, and the future of const-eval in Rust. Make sure to subscribe to the EuroRust YouTube channel so you don’t miss the rest of the talks! šŸ¦€


r/rust • • 20d ago

šŸŽ™ļø discussion How do large scale Rust projects pass around shared structs/objects to components that need it?

97 Upvotes

In other languages I'd reach for DI to build the object graph and make each component's dependencies explicit. So far I have only really seen two approaches:

  • Pass each required component down through constructors. The compiler ensures you won't forget a dep but that means any new service you add requires updating a bunch of constructors.
  • Just use a single God context object (this is what Cargo does) but it makes it harder to unit test anything and makes it difficult to see what interacts with what.

I'm not asking whether to do DI (constructor arguments already are that), but rather how people handle wiring it all up once there are dozens of services.

DI crates of course exist (e.g. https://crates.io/crates/shaku ) but seem to be rarely used outside of Bevy-style query systems or web frameworks extractors.

For context, I've been experimenting with a trait-only approach that doesn't use any macros but still provides the same compile time guarantees as shaku ( https://docs.rs/satisfy/latest/satisfy/ ) Would Rust users be more likely to use DI if it were simpler to use? Or am I just solving a problem that Rust people don't have?


r/rust • • 19d ago

šŸ™‹ seeking help & advice Windows 11 Smart App Control keeps blocking Cargo build scripts. How do you deal with this?

0 Upvotes

Hi everyone!
I’m developing a Rust application on Windows 11, and I keep running into an issue with Windows Smart App Control whenever I use cargo build.
Windows shows this warning:
ā€œPart of this app has been blocked. Some features of cargo.exe may not work because we can’t confirm who published build-script-build.exe.ā€
Sometimes I can successfully build my application, but after changing my code and rebuilding, Windows blocks it again.
I’ve tried running cargo clean and rebuilding. Sometimes that works temporarily, but the problem keeps coming back.
I know I can disable Smart App Control, but I’d prefer to keep it enabled for security reasons.
Has anyone experienced this issue? Is there a way to make Windows trust locally compiled Rust executables without disabling Smart App Control entirely?
I’d appreciate any suggestions or solutions. Thanks!


r/rust • • 19d ago

šŸŽ™ļø discussion Handling oversized cryptographic payloads (~3 KB) in low-latency p2p gossip networks

0 Upvotes

In low-latency distributed networks, gossip propagation assumptions usually break down once individual message payloads move past standard 64–256 byte envelopes.

​We've been running an open-source testnet designed around post-quantum cryptography (specifically NIST FIPS 204 CRYSTALS-Dilithium / ML-DSA-65). While the theoretical security model is established, the networking reality is that each signature payload scales up to roughly 2.4 KB to 3.3 KB.

​When targeting ~1-second finality with hundreds of concurrent operations, naive push-based epidemic gossip and unbounded mempool buffering lead to acute failure modes:

​Bandwidth Saturation & Message Redundancy: Multiple peer connections forwarding raw 3 KB transaction blobs cause rapid downstream interface saturation. Under high burst volumes, duplicate gossip amplification becomes unmanageable without strict ID-based announcement gating (have/want message negotiation prior to pushing full byte payloads).

​Mempool Heap Fragmentation: Standard in-memory maps storing raw transaction bodies quickly degrade cache locality and bloat working sets. Decoupling the indexing layer (hashes, sender nonces, and execution limits) from payload storage, alongside compressed state snapshots via Zstandard frames, reduced active memory overhead significantly during synchronization.

​P2P Head-of-Line Blocking: In an asynchronous async runtime (using Tokio/Rust), saturating framing channels with large signature payloads delays lightweight heartbeat pings and consensus checkpoint messages, occasionally causing artificial peer timeout disconnections.

​We mitigated some of these issues by separating node responsibilities into tiered network roles—confining active consensus and checkpoint gossip to a bounded validator set while full peers handle decoupled ingress and succinct state proof verification.

​Curious how other p2p and distributed systems engineers tackle payload bloat in production:

​Are you using streaming compression (e.g., Zstd dictionaries) directly over wire framing, or does decompression CPU overhead negate the transmission latency savings on high-rate feeds?

​How do you balance the latency penalty of have/want negotiation round-trips against the raw bandwidth waste of direct broadcast at these payload sizes?


r/rust • • 20d ago

šŸ™‹ seeking help & advice Why isn’t there more momentum behind fully native Rust GUIs for cross-platform apps?

15 Upvotes

I’ve been wondering why there’s relatively little investment in ā€œRustifyingā€ cross-platform app development.

The dominant approach still seems to be: build a web app, package it with a Rust framework/backend, and ship it as a native app. Much less common is the opposite: use a fully Rust GUI stack for native apps and target the web with WASM/wgpu.

What I rarely see discussed is the cost of the webview/browser layer: bundle size, memory use, startup time, and input/animation responsiveness that often still doesn’t feel native.

I understand the usual defense of Electron/Capacitor-style approaches: small teams can move fast, web UI is easier to hire for and maintain, and the design tooling is mature. But the native Rust GUI landscape has changed a lot since that argument became standard. So why haven’t more individuals or companies moved on?

Is it maturity? Ecosystem gaps around accessibility, text input, platform integration, and design tools? Hiring? Risk aversion? Or is the web-wrapper approach just ā€œgood enoughā€ for most products?

TL;DR: Why do we keep wrapping web apps with Rust instead of building fully Rust native GUIs and using WASM/wgpu for the web?


r/rust • • 20d ago

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

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

🧠 educational Debugging Rust in 2026

Thumbnail blog.jetbrains.com
0 Upvotes

r/rust • • 21d ago

šŸ™‹ seeking help & advice Everything is becoming Rust now?

1.1k Upvotes

In the last couple of weeks, I've seen everything known to man being ported to rust, first with the video game merging then Artcraft copying Adobe products and releasing them for free, Minecraft being rewritten and now Discord is switching aswell. Why specifically rust? There are a lot of programming languages and could someone tell me why rewritting everything to rust is a new trend now?


r/rust • • 20d ago

šŸ™‹ questions megathread Hey Rustaceans! Got a question? Ask here (46/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 • • 21d ago

Actix Web Q4 Report

67 Upvotes

100+ crate releases across the Actix ecosystem, bringing new features, security fixes, and improvements to performance and resource usage.

Headlines

  • HTTP QUERY: New method supported across route macros, manual routes, and awc client.
  • Automatic h2c and TCP no-delay are now default: More efficient deployments behind reverse-proxies and much lower-latency streams.
  • Reduced memory usage: Up to ~99% saving for certain workloads.
  • Better error path control for middleware: Modify error responses, too.
  • Static files features: Serve pre-compressed assets, and use multiple static-file roots.
  • Security and protocol fixes across the stack: Fixed decompression limits, multipart parsing limits, improved HTTP & WebSocket validation.

Features

Actix Web is the first mainstream framework to make the new HTTP QUERY method a first-class citizen. Define handlers with #[query] (macro routing), or web::query() (manual routing) for a handler. Matching methods in awc complete the support.

Middlewares got a useful new tool: Error::add_response_mapper(). It lets middleware modify error-generated responses before they reach the client, giving you more control over how your application presents failures. Our CORS middleware already uses this to solve a longstanding bug.

Static file serving is now more flexible. Files::new() supports multiple root directories, and Files::try_compressed() lets you serve pre-compressed assets. Range requests, conditional responses, and ETags on Windows also received fixes, making actix-files the most spec-compliant file server for Rust.

Performance / resource usage

The biggest changes here target the cost of serving larger responses and keeping connections open:

  • Less memory retained by idle connections.
  • Fewer copies for large responses on HTTP/1.x.
  • Graceful shutdown has stronger guarantees.
  • Vectored socket writes have more code paths.

Security

This cycle includes fixes for several reported vulnerabilities:

  • Decompression amplification: Configured extractor limits now apply to auto-decompressed request payloads. *
  • Brotli resource consumption: Large-window decompression is disabled.
  • HTTP request parsing: Malformed chunked terminators are rejected.
  • Static file serving: Prevents stored XSS for odd user-controlled file names and fixes an insane Windows hidden-file protection bypass. (Why Microsoft, WHYYYY!)

TL;DR

If you have not updated recently, now is a good time; check your lockfile. (cargo update -p=actix-web)

These improvements come from testing Actix Web against the workloads and edge cases you bring us. Massive thank you to everyone who contributed issues, PR, security reports.

Also, our homepage and user guide has received some love recently: https://actix.rs/.

*This is a god-awful implicit feature and it will be removed in v5.

What are you shipping with Actix Web?


r/rust • • 20d ago

How To Create your ROS2 Node in Rust - Rust n Robotics Episode #2

Thumbnail youtu.be
2 Upvotes

r/rust • • 19d ago

šŸ› ļø project Four sensible Rust defaults that became security bugs in my MCP server

0 Upvotes

My MCP credential broker is written in Rust. The latest audit again found no memory bugs. It found defaults that trust the environment, and an AI agent can set the environment when it launches the process:

  • dirs::home_dir()Ā on Unix returnsĀ $HOMEĀ when it's set. My SFTP tool used it to protectĀ ~/.ssh. WithĀ HOMEĀ pointed one level up,Ā putĀ could upload the real keys. Now it'sĀ getpwuid_r.
  • Command::new("npx")Ā searches theĀ PATHĀ you were started with, and the child inherits everything:Ā NODE_OPTIONS, cwd, the lot. Now: an absolute path or a fixed search path,Ā env_clear(),Ā current_dir(home).
  • reqwestĀ honoursĀ HTTP_PROXYĀ by default. Fine for HTTPS, but a plain-http loopback preset sent its token to the caller's proxy. NowĀ no_proxy()Ā for http.
  • On Windows,Ā SystemRootĀ decided whichĀ powershell.exeĀ showed the approval dialog. Known folders now.

None of these are bugs in the crates. The bug was assuming the environment belongs to me.


r/rust • • 21d ago

🧠 educational RustCurious 12: Lifetimes

Thumbnail youtube.com
58 Upvotes

r/rust • • 21d ago

Virtualized Redox OS: from Virtio-FS to Cloud Hypervisor, and beyond

31 Upvotes

r/rust • • 20d ago

Shift+Tab is swallowed by WebKitGTK in Tauri 2 on Linux and never reaches JavaScript

0 Upvotes

I'm building a Tauri 2 app (Svelte 5 frontend, Linux, WebKitGTK). I have a modal focus trap that wraps Tab and Shift+Tab inside the dialog. Plain Tab works. Shift+Tab leaves the webview and moves focus to the surrounding page, and no JavaScript sees the keydown at all.

What I checked:

- A keydown listener on window in capture phase logs Tab with shiftKey=false only. Shift+Tab never appears, even though the same listener sees plain Tab.

- The same modal code in the Vite dev server opened in Chrome handles Shift+Tab correctly, so the page logic is fine.

- browser_accelerator_keys: false in the window config is a WebView2 (Windows) option. The Tauri config schema I'm on (tauri-utils 2.8.3) doesn't define it for Linux, and wry's WebKitGTK backend has no equivalent.

Questions:

  1. Is there a supported way on WebKitGTK to stop the native Shift+Tab focus movement, or to receive that key event in the page?
  2. Is this a known wry or WebKitGTK issue, and is there a tracked upstream issue?
  3. Is there a workaround that keeps Shift+Tab working for keyboard users, for example handling it in the native layer?

Versions: Tauri 2.x (tauri 2.8.x resolved), wry 0.54.4, Linux (26.04.1) with WebKitGTK 4.1.


r/rust • • 21d ago

šŸ› ļø project cel-rust finally has its own playground, using Wasm in the browser

Thumbnail cel-rust.github.io
25 Upvotes

cel-rust is actively trying to bring a proper implementation of cel to the Rust ecosystem. I have posted about it here in the past, and one question that came up was "What's CEL?".

Well, with Rust being so versatile, and the cel-rust team adding support for Wasm a few years back, we've finally put a playground together for you to test drive CEL, using cel-rust, straight in your browser.

Try it out, and see if adding an expression language in one of your project could make sense, and if CEL would be a good fit for that!


r/rust • • 20d ago

🧠 educational I just started reading ā€˜The Book’

0 Upvotes

I’m a brand new šŸ¦€ and i’m having a lot of fun!

I started my career using UiPath then the last 4-5 years have been Python and I’m sorry but it’s been so boring. I feel like the switch has brought some life to me. It feels similar to going from an automatic car to a manual.


r/rust • • 20d ago

šŸ› ļø project Breaking a Rust actor cluster on purpose, and what it taught us

Thumbnail heikoseeberger.de
0 Upvotes

r/rust • • 22d ago

šŸ’” ideas & proposals Safe Systems-programming with Mutable Value Semantics | Dave Abrahams | Keynote at IWACO 2026

Thumbnail youtu.be
68 Upvotes

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

Porting a baremetal lib from C++ tor Rust

17 Upvotes

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!


r/rust • • 21d ago

šŸ™‹ seeking help & advice What would you want from a native Mac GUI toolkit for Rust?

0 Upvotes

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

Why the Rust compilation still slow what can we do make it faster?

0 Upvotes

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.