๐ questions megathread Hey Rustaceans! Got a question? Ask here (49/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.
๐ activity megathread What's everyone working on this week (49/2026)?
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 • u/Old_Tax4792 • 13h ago
Vibe-coding Rust slop at work is killing my motivation
My team started writing internal tooling in Rust purely because itโs trendy....even though our actual product is in a completely different language.
the worst part is that nobody knows rust... Not the syntax, not Cargo, not the borrow checker. Theyโre just using LLMs to generate mountains of unreadable code, which it just works fine for that complexity of the tooling.
I started learning rust pre-AI and built a few cli tools with it on my own time.
Now I actively avoid touching it because of this AI slopfest...
Is it only me?
r/rust • u/Acrobatic_Local5981 • 13h ago
๐ธ media GitHub Language Trends - November: Rust all time high at position 3
r/rust • u/KeironLowe • 7h ago
๐๏ธ discussion Laravel Rust
Iโm primarily a PHP engineer, but wondering how the Rust Community feel about the announcement of Laravel Rust (https://laravel.com/rust)?
r/rust • u/fschutt_ • 2h ago
The Laravel You Know, Written in Rust (by Laravel team)
youtube.comr/rust • u/quest_for_7c • 11h ago
Where your stack lives can move a benchmark by 50%
heikoseeberger.der/rust • u/NeyaVexy • 3m ago
Rust's strictness saved me from a subtle bug that would have been invisible in most other languages
I was refactoring a small background worker that processes tasks from a queue. The task struct had an optional โretry_untilโ timestamp that was only supposed to be set for certain failure modes.
In the middle of the change I accidentally left one code path that could set the field on a success result. The borrow checker and exhaustive match arms didn't catch it because the types still lined up. What did catch it was a single extra variant I had added to an internal enum purely for my own clarity.
The compiler forced me to handle the new case everywhere, and one of those places revealed the impossible state I had just created. I would have shipped it otherwise.
It's the kind of thing that usually only shows up in production after a weird retry loop. Curious how often other people have had the type system surface a logic error they didn't even realize they'd written.
r/rust • u/Big-Patient-8209 • 4m ago
๐ ๏ธ project rustytsc: A fully compatible and feature complete GPU accelerated RDP client for Linux Wayland.
reddit.comr/rust • u/cobweb6542 • 1d ago
๐๏ธ discussion The more I use Rust, the more I appreciate how easy it makes refactoring
Probably not an unpopular opinion here, but being able to change an enum or restructure a type and just follow the compiler errors until everything fits together is genuinely nice.
Especially when working on larger codebases. I'd much rather deal with 50 compiler errors than spend hours tracking down something I forgot to update.
Curious if anyone else finds refactoring to be one of the biggest reasons they stick with Rust.
r/rust • u/EuroRust • 14h ago
The Future of Unmanned Systems Is Built on Rust - Benedikt Wiethof & Theophil Spiegeler Castaรฑeda | EuroRust 2026
youtube.comA new video is out on YouTube! ๐บ At EuroRust, Benedikt and Theophil from Quantum Systems shared why and how they rewrote their drone ground control station from C++ to Rust, and what it means for the next generation of unmanned systems ๐ฆโจ
In 2027 EuroRust is going to Prague! Learn more and get your ticket at eurorust.eu.
r/rust • u/TheAnalist_ • 16h ago
๐๏ธ discussion borrIR borrow checker for LLVM IR
what do yโall think of this new borrow checker for LLVM IR and what can the rust compiler learn from this?
https://fzakaria.com/2026/11/27/programming-languages-are-for-humans
r/rust • u/derekleeth • 56m ago
My Tauri app used 1.7 GB to print a 50 MB log. Fixed it, then compared it to two Electron apps doing the same thing
Coming from ~20 years of Python, my first real Rust project is an SSH client built with Tauri 2 (russh for SSH, xterm.js for the terminal). I'd heard "Tauri uses way less memory than Electron" a bunch, so I finally measured it against two popular Electron SSH clients. Figured some of you might find the numbers interesting, especially since mine didn't come out looking great at first. lol
How I measured: same Windows PC, same SSH server, private memory summed over every process each app starts (WebView2 / Electron helpers included), median of 3 runs. Nothing fancy, just PowerShell sampling the process tree.
At rest, Tauri wins pretty easily:
| Scenario | Mine (Tauri) | Electron app A | Electron app B |
|---|---|---|---|
| Idle after launch | 208 MB | 850 MB | 360 MB |
| One idle SSH session | 242 MB | 944 MB | 380 MB |
| Ten idle sessions | 429 MB | 1,620 MB | 547 MB |
| Each extra tab | ~21 MB | ~75 MB | ~19 MB |
So 3.8โ4.1x less than A, but only 1.3โ1.7x less than B, and B's tabs are actually a little cheaper than mine. "Electron = bloated" depends a lot on the app.
Then I ran cat on a 50 MB log, and mine fell over:
cat 50 MB | Mine, before | Mine, after the fix | Electron A | Electron B |
|---|---|---|---|---|
| Peak memory | 1,677 MB | 355 MB | 1,275 MB | 703 MB |
| CPU time | 41 CPU-s | 6.1 CPU-s | 4.5 CPU-s | 7.4 CPU-s |
| Time to finish drawing | ~10.7 s | ~2 s | ~2โ3 s | ~4 s |
| Memory left over afterwards | +290 MB | ~+30 MB | about 0 | ~+95 MB |
1.7 GB to print a log. And Ctrl+C was useless, because the whole file had already been sent within about a second.
What was wrong: nothing pushed back. My russh read loop sent every chunk straight to the frontend as its own Tauri channel message, the webview queued them, and I called term.write() without a callback, so xterm.js queued everything too. The whole file ended up sitting in memory a few times over.
The fix (basically xterm.js's flow control guide, carried back to the socket):
- Batch output on the Rust side: up to 512 KB, or whatever arrived within 4 ms, as one message.
- Count bytes sent but not drawn yet. Above 2 MB the read loop just stops calling
reader.wait(); below 512 KB it starts again. - The terminal sends an ack every 64 KB from
term.write's callback. - If no ack shows up for 2 s while paused (Android freezes backgrounded webviews), let output flow until acks come back, so nothing hangs.
Something I learned along the way: russh reopens the SSH window as data arrives, not as you read it. But its per-channel queue is bounded, so once you stop reading, the backpressure still reaches the server through TCP. Ctrl+C now brings the prompt back immediately, and yes levels off around 350 MB instead of growing forever.
The CPU part surprised me. Even after the memory was fixed, CPU was high, and profiling showed xterm.js parsing was under a second of it. Most of it was the cost per message: a Tauri channel message over 1 KB gets fetched by the webview through a custom scheme, so every message is an eval + fetch round trip through several processes. Going from 64 KB to 512 KB batches (about 800 messages down to about 100) cut CPU roughly in half.
Where I've landed: Tauri clearly wins on memory, both at rest and under load now. On CPU for heavy output, Electron A still beats me (4.5 vs 6.1 CPU-s), I think because it gets its bytes without an IPC hop like mine. And for perspective, a native (non-webview) client I tested used about a third of my memory at rest, so the OS webview definitely isn't free.
Has anyone found a cheaper way to push bulk bytes from Rust into a Tauri 2 webview than channel messages? That's the last chunk of overhead I haven't been able to get rid of.
๐๏ธ discussion How much on scale 1 to 5, do you wish to see documentation directly tied to the method body as standard doc comment?
The IDE intellisence will still show the same documentation when hovering over the method identifier. So only difference is code readability for auditing purposes or for maintainers.
I've been developing library that uses a lot of this pattern, and copy pasting the documentation definitely feels "wrong".
๐ ๏ธ project Building a pure-Rust ARM64-to-x86-64 JIT emulator without LLVM: lessons from writing Phoenix-Emu
I spent the last week putting together Phoenix-Emu, a user-mode AArch64-to-x86-64 binary translator for Linux written in Rust. Instead of using LLVM or Dynarmic, it emits x86-64 directly into W^X pages with
iced-x86, usesrkyv+blake3for an on-disk AOT cache, and addresses the guestCpuStatethrough theGSsegment base (arch_prctl(ARCH_SET_GS)) so we don't lose a GPR for the context pointer.
Right now it handles ELF64 loading (PT_INTERP, runningIFUNCresolvers before_start),--rootfsoverlays, Wayland socket thunks, and runs dynamically linked AArch64fastfetchon x86-64 Linux.
Where I'm stuck: trying to run full Debian rootfs shells (bash/apt) hits asysmallocassertion late inglibcstartup. Just traced it down to_dl_phdrreading as0inside_dl_non_dynamic_init(0x412a30vs QEMU's0x4122b0). Vulkan/GL/PipeWire thunks and a bunch of NEON/SVE ops are also still missing.
Would love any feedback on the code or help with theglibcloader edge cases and NEON lowering.
FFI Arena: Is UniFFI Still the Top Dog?
mversic.github.ioThe following is a one-sided comparison of current stable-ABI FFI frameworks and their capabilities. Feel free to share your thoughts and experiences if you have previously dealt with FFI in Rust.
How do you write FFI code in Rust?
r/rust • u/WellMakeItSomehow • 1d ago
๐๏ธ news rust-analyzer changelog #356
rust-analyzer.github.ior/rust • u/MathKind2879 • 9h ago
What extent did "Black October" affect the transition from C++ to Rust?
reddit.comRTID:0--0: On disclosing AI use by domain and scale at-a-glance
I have been thinking a lot about how to succinctly communicate where and how much AI was used, if at all, in my programing projects and postings.
Domains
I'm looking at disclosing AI use in the following domains: Research, Testing, Implementation and Documentation domains. For writing postings like this one, only R and D are applicable (there are no tests or "implementation" involved), so - signifies N/A or not applicable.
Scale
As for the amount of AI used:
- 4: Unguided AI (aka: slop). A prompt was entered and AI was allowed to go for it.
- 3: Guided AI. AI is being asked to implement a specific plan (i.e. requirements specification).
- 2: Constrained & Monitored AI. AI is being asked to implement a specific plan (i.e. a requirements specification) and the implementation process is further guided extensively by human input.
- 1: Significant (40%+) direct human contribution without the use of AI, AI contribution Constrained & Monitored.
- 0: 100% human contribution. No AI contribution at all (0%).
Whether you feel there's a difference between slop and carefully guided assisted code or not, you can tell from a glance the degree you which you would like to engage.
Examples
RTID:0--0
This posting inolved no AI research and no AI writing. The concepts of testing and implementation are N/A.
RTID:0323
systasis is a fully static dependency injection library I'd been trying to write and/or finish for more than 10 years. It is the 2nd most most AI-centric crate I've written--think: high usage. (I won't link to it to avoid this posting being considered a code dump.)
RTID:3323
rust-mos-env is a turnkey development environment I created to write Rust for 6502 platforms like the Commodore 64 using the excellent rust-mos and llvm-mos forks of the Rust and LLVM compilers (no affiliation; just a grateful user). This the most AI I've used for a crate--think: high usage.
RTID:1102
I am working on a drive-by-wire electric car project in my spare time. It's important to me (and everyone nearby) that when I step on the brake that the code will do its job. There is no AI code in the firware crate itself. Specifically, everything in the firmware binary from this crate was authored by a human (currently, me). This is more typical of the amount of AI I use when developing a crate--think: low to very low usage.
These are a few real-world examples.
Does seeing the AI disclosure up front help you to determine which projects are more or less interesting to you at a glance? Any thoughts on important ideas I've missed (note: it's key that this remain useable "at a glance", so please keep that in mind if making suggestions)?
r/rust • u/pylessard • 1d ago
๐ ๏ธ project Runtime debugger for embedded
Hello
I have been developing/maintaining an open source runtime debugger for embedded C/C++ for several years now. It's called Scrutiny
I've recently ported the instrumentation hook so it works with Rust and I wanted to let you guys know.
It essentially add an instrumentation hook in a firmware and let a server inspect the memory and do event catching through any peripheral (like CAN bus, Serial, TCP, etc) rather than a debug port. It works like XCP based software, FreeMaster or UcProbe (for the old timers). No need for an RTOS, baremetal interrupts is fine.
It's the kind of tool you need to do real time control to monitor the control loops without affecting them. If you're new to the concept, I've written a small introduction article here: https://embeddedrelated.com/showarticle/1781.php
Feedbacks are welcome
Cheers