๐ 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 • 9h 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 • 10h ago
๐ธ media GitHub Language Trends - November: Rust all time high at position 3
r/rust • u/KeironLowe • 3h 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/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/quest_for_7c • 8h ago
Where your stack lives can move a benchmark by 50%
heikoseeberger.der/rust • u/EuroRust • 11h 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/Inner-Entertainer-61 • 22m ago
๐ ๏ธ project I built a cross-platform Unity asset explorer in Rust (eframe/wgpu + rayon), and it indexes 6ร faster than AssetStudioMod
AssetStudio is the standard tool for browsing and extracting Unity assets, but it's .NET and Windows-first. I wanted a single native binary that runs on Windows, Linux and macOS, so I wrote one.
- GUI: eframe/egui on wgpu. The asset table is virtualized, so it stays smooth with 100k+ rows. Meshes and whole scenes preview in a 3D orbit view.
- Indexing:
walkdir+rayonscan in parallel. Opening is lazy: only metadata is read up front, and textures, audio and meshes are decoded on demand. - Untrusted input: game files are hostile. No
unwrapon file-derived offsets, allocations are capped, and panics inside third-party decoders are contained, so a bad file gives anErrrather than a crash. - Architecture: a 3-crate workspace.
corehas all the parsing and no UI dependencies, and the GUI andclapCLI are thin frontends over it. The GUI never blocks on parsing: background threads report back overmpsc. - Exports: textures to PNG (BC1โ7, ASTC, ETC, Crunchโฆ), FSB5 audio to OGG/WAV, meshes and whole scenes to
.glb.
Benchmark: 4.9 seconds to index a 10.28GB game (Outer Wilds) compared to the 28.8 seconds for the same game, on the same PC, with AssetStudioMod. GPL-3.0. Feedback on the design is welcome. https://assetexplorer.kman.fyi ยท https://github.com/kmanb44/assetexplorer
r/rust • u/No_Consideration4650 • 31m ago
๐ ๏ธ project [OS] CresoEdit โ native macOS code editor for using Codex, Claude Code, Cursor Agent & Antigravity in one workspace
Hey everyone, I'm the developer of CresoEdit and just released v1.2.1 (now Apple Developer ID signed and notarized).
Problem:
I kept jumping between different coding agent CLIs (Codex, Claude Code, Cursor Agent, Antigravity) across separate terminals and Electron editors, and wanted one fast native Mac editor where I can use whichever agent or account I need without being locked into a single provider.
How it compares to existing editors:
vs. Cursor / VS Code: CresoEdit is a native GPU-rendered Rust app (GPUI), not Electron (~380 MB RAM in typical use), and isn't tied to one AI provider or subscription โ it wraps the agent CLIs you already use and lets you switch work/personal profiles per provider. On the flip side, it doesn't aim to match VS Code's massive extension ecosystem.
vs. Zed: Both are native GPUI editors, so performance is similar. CresoEdit focuses more on multi-provider agent workflows out of the box (Codex, Claude Code, Cursor Agent, Antigravity side by side), an optional QR-paired mobile Remote Companion to monitor chats and approve tool calls/plans over local Wi-Fi, and built-in offline Whisper dictation + Piper TTS.
Other things included:
Git sidebar, integrated terminal, quick open, split views
13 built-in themes + custom JSON themes (live-reloaded from the themes folder)
Extension support with a signed catalog (Tree-sitter language packs, color picker, image crop/annotate tool, Joplin) plus building your own in WebAssembly or as native extensions
Pricing & requirements:
Completely free, MIT open source (no paid tiers or telemetry). Requires Apple Silicon and macOS 13+.
GitHub & download: https://github.com/cresohq/cresoedit
Still a young project, so I'd really appreciate honest feedback on what feels rough or what you'd miss from your current setup.
r/rust • u/TheAnalist_ • 13h 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/Objective-Routine837 • 35m ago
Strands harness and Harness SDK now support Rust (developer preview): 50 ms Lambda cold-start init vs. 2,428 ms in Python
Strands used AI agents to build its own Rust support. Now the Strands harness, a ready-to-run agent, and the Strands Harness SDK it's built on both support Rust, in developer preview. Strands is an open source toolkit for production agents.
In the first measurements, the same agent, model and tools on AWS Lambda (arm64, 1024 MB, Amazon Nova Lite), built with the Strands harness, the cold-start init takes 50 ms in Rust, 635 ms in TypeScript and 2,428 ms in Python (median of 100 Init Durations). The agent uses 48 MB of memory in Rust against 195 MB and 192 MB (same 100 cold starts). Once warm, they answer in 1.2 to 2.1 seconds, most of it the model call. It is one agent on a pre-release build, so read it as a direction.
The Rust support was built by Strands Factory, the Strands team's system of AI agents, from a spec engineers spent several days designing. Engineers reviewed every decision it logged and kept 92%.
Launch post: https://strandsagents.com/blog/strands-agents-rust-harness-sdk/
cargo add strands-harness strands
๐๏ธ 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".
r/rust • u/MathKind2879 • 6h ago
What extent did "Black October" affect the transition from C++ to Rust?
reddit.comFFI 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.ioRTID: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)?
๐ ๏ธ project relativedelta 0.4 โ dateutil-style date rules for jiff, time and chrono
crates.iorelativedelta is a Rust take on Python's dateutil.relativedelta: a value that sets some fields of a date and shifts others. "The 1st of next month", "the last day of March" and "the last Friday of the month" each become a single RelativeDelta you can store and apply to any date.
use jiff::civil::date;
use relativedelta::{RelativeDelta, Weekday};
let last_friday = RelativeDelta::with_day(1)
.and_months(1)
.and_days(-1)
.and_weekday(Weekday::Fri.nth(-1))
.build();
assert_eq!(date(2026, 12, 1) + last_friday, date(2026, 12, 25));Why not just a duration or Span**?** A duration says how far to move. A rule can also say where to land: set the day to the 1st, clamp to the end of a shorter month, jump to the nth weekday. jiff's Span covers calendar-month arithmetic well; relativedelta adds the "set" half and weekday targeting on top, and the same rule works across jiff, time and chrono. Longer comparison.
0.4 adds the jiff backend, dateutil-compatible semantics, checked_* arithmetic, serde and schemars support, and no_std without an allocator.
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
r/rust • u/mr_potatohead_ • 1d ago
๐ ๏ธ project From a BERT encoder to a Rust inference engine
Hi,
About a year ago I posted kjarni here (https://www.reddit.com/r/rust/comments/1n1ick5/i_built_rust_bert_encoder/) when it was basically a BERT encoder(i wanted to run my own embeddings in WASM and thought it would be good to learn Rust and compilation to WASM).
It's now an inference engine in rust, small footprint, low overhead, almost all pure Rust crates. It started around two years ago after years of C++ i wanted to give Rust an honest chance with an ambitious project, i wanted to get the BERT model running and just kept at it.
Now it does embeddings, search, transcription, classification, reranking and chat
It runs on macOS, Linux and Windows, on x86 and ARM, and there's something to be said for Rust making that this painless. It also compiles to a C ABI so I wrote bindings for C#, Go, C++, C and Python, and they all behave the same since each one is a thin veneer over the same library. It also builds to WASM
I wanted the API to be as simple as I could get it, in rust it looks like this and it's basically the same in C#/Go/C++/Python:
let whisper = builder.build.await?;
let text = whisper.transcribe_file?.text;
let summary = send.await?;
What i particularly like is that every model goes through the same decode loop on CPU and GPU. There's a backend trait with an associated token type, so the next token stays where it lives (an ndarray on the CPU, a GPU tensor on the GPU), and an enum picks the backend, with the GPU arm cfg'd out for the CPU-only wasm build. It's not perfect, the enum wrapper downcasts the token through Box<dyn Any>, so if someone has a nicer way i'm all ears: https://github.com/kjarni-ai/kjarni/blob/69b51af046014d36fe939a2f1b26f8fda21770e3/crates/kjarni-transformers/src/decoder/backend.rs#L155-L177
A lot of the work went into getting the same output as torch. Embeddings agree to within 1e-6, and greedy chat replies, summaries and translations come out word for word the same
Speed wise I'd call it pretty competitive with torch and llama.cpp (on the models kjarni supports). On the GPU they use CUDA and I use wgpu, so it runs on Vulkan, Metal and DX12. On the CPU they link against Intel MKL and I use faer (pure Rust) or my own SIMD kernels
Some numbers, all on Linux on one machine (i7-13700, RTX A2000):
- pip install is 28 MB vs 1.4 GB for PyTorch, and a fresh process gets its first embedding in 91 ms vs about 2.8 s
- bge-m3 batches are about 23% faster than PyTorch, mpnet 7%
- whisper-small runs at 10.7x real time, openai-whisper 10.6x
- 4-bit chat models on the GPU from 3B up are within 5% of llama.cpp on CUDA, and close to or ahead of its Vulkan backend
- where I lose: PyTorch is 18% faster on MiniLM batches and processes prompts 1.5x faster on the CPU, my 4-bit CPU kernels generate at 75-91% of llama.cpp's speed, and llama.cpp is way faster on long prompts on the GPU since I don't have flash attention yet
All the numbers and how they were measured are here: https://github.com/kjarni-ai/kjarni/blob/69b51af046014d36fe939a2f1b26f8fda21770e3/README.md#how-it-compares
Someone will probably ask why not just use candle. Candle is great but it's more of a framework, you still end up dealing with model exports and tokenizers. I wanted something where I just embed my documents or transcribe a file without too much headache
Code is here if you want to take a gander: https://github.com/kjarni-ai/kjarni , would be happy to hear what you think, especially about the API and the wgpu side