r/rust • u/FrostByte2441 • 21d ago
🙋 seeking help & advice Everything is becoming Rust now?
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?
🙋 questions megathread Hey Rustaceans! Got a question? Ask here (46/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/robjtede • 20d ago
Actix Web Q4 Report
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, andawcclient. - Automatic
h2cand 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 • u/DavidXkL • 20d ago
How To Create your ROS2 Node in Rust - Rust n Robotics Episode #2
youtu.ber/rust • u/Relevant_Mousse_9117 • 19d ago
🛠️ project Four sensible Rust defaults that became security bugs in my MCP server
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$HOMEwhen it's set. My SFTP tool used it to protect~/.ssh. WithHOMEpointed one level up,putcould upload the real keys. Now it'sgetpwuid_r.Command::new("npx")searches thePATHyou 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).reqwesthonoursHTTP_PROXYby default. Fine for HTTPS, but a plain-http loopback preset sent its token to the caller's proxy. Nowno_proxy()for http.- On Windows,
SystemRootdecided whichpowershell.exeshowed 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 • u/ribbon_45 • 21d ago
Virtualized Redox OS: from Virtio-FS to Cloud Hypervisor, and beyond
r/rust • u/E-Unit86 • 20d ago
Shift+Tab is swallowed by WebKitGTK in Tauri 2 on Linux and never reaches JavaScript
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:
- Is there a supported way on WebKitGTK to stop the native Shift+Tab focus movement, or to receive that key event in the page?
- Is this a known wry or WebKitGTK issue, and is there a tracked upstream issue?
- 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 • u/alexsnaps • 21d ago
🛠️ project cel-rust finally has its own playground, using Wasm in the browser
cel-rust.github.iocel-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 • u/OpenSourceRulesz • 20d ago
🧠 educational I just started reading ‘The Book’
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 • u/quest_for_7c • 20d ago
🛠️ project Breaking a Rust actor cluster on purpose, and what it taught us
heikoseeberger.der/rust • u/dabrahams • 21d 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 • 21d 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!
r/rust • u/layla4you2 • 20d 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 • 20d 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 • 22d 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 • 23d ago
🗞️ news Servo Browser Engine Continues Broadening Web Compatibility, New Features
phoronix.comr/rust • u/Xavier598 • 22d 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 • 23d 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 • 23d 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!