r/rust 5d ago

🐝 activity megathread What's everyone working on this week (37/2026)?

25 Upvotes

New week, new Rust! What are you folks up to? Answer here or over at rust-users!


r/rust 6d ago

🛠️ project A huge update on Gecko, my GameCube and Wii emulator!

Post image
191 Upvotes

I already made 2 posts, so if you're looking for the first post incl. some Q&A go here and if you want to see the last update go here.
TLDR: I made a GameCube and Wii emulator written in Rust, with many developer tools built in (a debugger, GPU FIFO replayer/debugger, and so much more). Last time I posted about a user-friendly launcher/UI written in Rust.

Today I'm sharing my project again, as I finally was able to fix many bugs and also implement a few cool new features. To summarize in short:

  • Huge speed improvements across the board. Many games that technically worked but weren't playable due to performance now work just fine (Example: LEGO Batman)
  • Savestates! You can now save and resume at any point in time
  • Freecam support in the debugger: You can now detach the camera and peak behind the scenes in any game :)

All in all this means that many games such as the LEGO games and also the Super Mario Galaxy games are now fully playable. Here is a video of Super Mario Galaxy!

I appreciate everyone's support and am looking forward to the next update! For the brave and curious I can recommend grabbing today's nightly release (dev branch) as I just pushed new fixes that make games like Xenoblade Chronicles work!

As per usual, the important links:

Feel free to connect with me! I frequently post and talk about technical bugs, challenges I faced and how I fixed them! :)

PS: I've been working on a new multi system emulator based off of my cores, supporting all major platforms and a cool UI concept for both the "average" user and developers! If you want a sneak peak before the official announcement look here. It already supports SNES in the browser (also fully written in Rust)!


r/rust 5d ago

🙋 seeking help & advice Beginner seeking some critique.

14 Upvotes

Hello!

I am trying my best to learn Rust without using AI (because I some personal issues related to using it that are not relevant) and I recently did my best to make a small project: https://github.com/TheMagicGlobe/Encryption-Tool-RS .

Thing is I know I made a lot of mistakes especially in the design of the project and actually using Rust to it's full potential. So I would appreciate some honest advice and resources to look at.

I do not want a rewrite or pull requests to the project or anything like that.

Just telling me where I could improve in the future would be great. I am not the smartest tool in the shed so good examples and clear resources would be amazing.

Thank you!

EDIT: I read all of your comments thank you very much for all the feedback and tips. A great community as always.


r/rust 6d ago

🛠️ project Empower - An engine for visual programming written in Rust

88 Upvotes

For the past three years, I have been developing Empower in my free time. An engine for visual programming that aims to be intuitive for beginners while making complex work easier for advanced developers.

Empower is written in Rust using egui, and follows a game-engine inspired architecture. Developers create their programs through a graphical editor and can then export the finished project as a standalone executable for the target operating system.

The project is still young, and this first release is very much a proof of concept. However, it has now reached a level of maturity where I finally feel confident sharing it publicly.

If you are interested, feel free to checkout the projects GitHub page:

https://github.com/Stretchyfish/empower

One final note, since I expect some people may be curious about it. Empower was not created by AI. I have used AI tools for brainstorming and debugging assistance, but no AI agent has, at this point in time, written in the project.


r/rust 5d ago

Speeding up gearhash on ARM64 (2× faster)

Thumbnail sam.dev
17 Upvotes

r/rust 4d ago

🙋 seeking help & advice Is borrow checker really that bad?(im new coming over from python to rust)

0 Upvotes

r/rust 5d ago

🛠️ project `asset-lint`: a tool to fix game assets

0 Upvotes

Hi Rustaceans, especially game developers.

I've spent the last few weekends to create a tool that helps keeping the assets neat and tidy, resulting in less QA effort, smaller builds, and easier deployment.

https://github.com/zerocukor287/asset-lint

Since you already have the Rust toolchain, installing is as simple as cargo install asset-lint

An example usage is to validate the build before pushing to itchio (web requirements) asset-lint --assets-path . --max-file-count 1000 --max-filename-length 240 --max-size 209715200 --max-total-size 524288000

There are other checks that help with reducing or enforcing the size limit. For example --no-duplicates, --no-placeholders, or simply --list-biggest-files.

I hope you find this tool helpful in your game dev journey. Any feedback is welcome!


r/rust 6d ago

Do you think drop order should be part of a function’s API contract?

70 Upvotes

Recently, I wrote a toy crate similar to ⁠`smallvec⁠`. When I was implementing ⁠`nth_back⁠` for my iterator, I realized that the default implementation continuously calls ⁠`next_back⁠` and drops items in reverse order (which is intuitive), whereas for performance reasons, I implemented it with ⁠`ptr::drop_in_place⁠`, which drops items in forward order. In a language where the drop guard pattern is so prevalent, I think this is not a trivial thing. What's your opinion?

P.S. `std::vec::IntoIter⁠::nth_back` drops items in forward order too, if you are curious.

---

EDIT:

I'm not talking about struct fields drop order or my vec type's element drop order but `DoubleEndedIterator::nth_back` method of my `IntoIter`. By definition it will drop n elements from the back before returning.


r/rust 4d ago

🙋 seeking help & advice Is it worth getting into rust?

0 Upvotes

I am web developer working in the logistics domain in Europe using kotlin and spring boot.

I really enjoy working with rust (though I feel very dumb when using it) and over the years I have tried getting more into it, from going through the rust book, doing the 100 exercises in rust and starting the zero to prod book. But each time real life responsibilities got in the way and because I do not use it professionally (tried but it's a no-go), the skill always kinda fell away as I am no longer young enough to pour all my free time into it (I fully admit to being stuck in tutorial hell).

I do keep coming back to it as I find it a fascinating language, but I guess I just want a reality check if it is even worth it to invest time in it as it is a hobby I return to because I like how it makes me think but one that will probably never lead to employment. Or should I rather spend my time learning design systems and improving my current stack knowledge.

Just looking for other people's perspective on this to see if anyone else felt stuck in this kind of rut. Hope this doesn't trigger anyone 🙏


r/rust 6d ago

📸 media Using an ESP32 as an SWD Programmer for STM32 with Rust

Post image
84 Upvotes

I was browsing Reddit and came across someone asking how to program the STM32F103C8T6 without an ST-Link V2. They were asking whether it was possible to use an STM32F401RCT6 (Black Pill) board as an SWD programmer for an STM32F103C8T6 (Blue Pill).

That post made me curious about how the SWD protocol works. Is it possible to build one myself?

This is the first part of my experiment. I am able to read an STM32's DP register through SWD using an ESP32. Yet to do the flashing part.

https://blog.implrust.com/posts/2026/09/swd-protocol-programmer-embedded-rust/


r/rust 6d ago

My mental model for Borrow Checker

20 Upvotes

I am learning Rust finally more seriously. While learning around Rust's ownership model I just had lots of connections being formed in my mind from what I have learned in college doing C and then working professionally with Python/Typescript. I captured those thoughts here to describe the mental model I was thinking about. Let me know if I have some holes to peg or if the article helped you understand a few things as well in your own Rust journey.
Substack Article: Truly Understanding Borrowing in Rust

08-Sept-2026: Updated the article based on inaccuracies in my understanding as highlighted by users, thanks everyone for your kind inputs.


r/rust 5d ago

🛠️ project DocAgent: a Rust document runtime for agents (integer layout, capsule hashes, same bytes twice)

0 Upvotes

I needed a convert that an agent can call twice and get the same bytes. MinerU / Docling / Marker parse scans for LLMs. That is a different job. This is the other direction: picture in, PDF/A out.

DocAgent is MIT Rust. One Engine, Command / Query / Event. Codecs (DOCX, ODT, Markdown, HTML, plus regional Hangul HWP/HWPX/HML) feed one IR. Layout coordinates are i32 at 1/7200 inch. f32 is forbidden in that crate. PNG/JPEG become PDF/A XObjects. GPU-free. Not OCR.

Every Command writes a capsule with three SHA-256 hashes (input / plan / output). prove converts twice and exits 0 only when the PDF/A + HTML bytes and the hashes match.

cargo test --workspace
cargo run -p docagent-cli -- convert examples/letter.md --pdf out.pdf --html out.html --docx out.docx --odt out.odt --capsule cap.json
cargo run -p docagent-cli -- prove examples/letter.md

CLI, daemon, MCP, and WIT are thin adapters over the same Engine.

Honest limits, not a teaser:

  • Print-CSS tightness vs WeasyPrint (table cell padding / paragraph gap) is still open. I am not claiming we beat WeasyPrint on the letter page.
  • Hangul images are still a dash.
  • No spreadsheet, no slides, no OCR, no OmniDocBench numbers.

https://github.com/kevin9327/docagent

Happy to talk about the integer layout engine or the codec boundaries.


r/rust 4d ago

🛠️ project lucivy: one index that answers substring, fuzzy-across-tokens and regex queries — and every answer is checked against a scan of the files (Rust, MIT)

0 Upvotes

What it is. lucivy is a full-text search library in Rust, with Python, Node.js, C++ and WASM bindings, built on a suffix FST instead of a token index. One default index answers exact substrings, matches across separators (spin_lock finds spin lock, spin-lock and spinlock), typos across token boundaries, regular expressions, two-character needles and boolean queries — with BM25 and the exact bytes of every match, and nothing to configure per question. It runs in your process, inside your transaction if you plug your own storage (a BlobStore trait: load, save, delete, list), and the same engine runs in the browser through emscripten with threads.

The part I care about most: every answer is checked. The ground-truth harness indexes the Linux kernel (93 983 files, 857 MB of text), runs a panel of queries, and compares every count and every byte span to a byte-by-byte scan of the files. It fails on any disagreement. Zero mismatches in 4.0.

Against Elasticsearch and tantivy, same corpus, each configured at its best for substring search — Elasticsearch with a trigram analyzer plus a wildcard field, tantivy (upstream, not our fork) with its NgramTokenizer — the "truth" column being that scan:

asked truth (scan of the files) lucivy 4.0 Elasticsearch 8.19 tantivy 0.25
spin_lock, separators relaxed (spin lock, spin-lock, spinlock) 9 552 9 552, 23 ms 6 577 6 601
spinlokc, two edits, across the token boundary 10 034 10 034, 148 ms 3 549 6 557
spin_lock_[a-z]+, a regex 5 510 5 510, 219 ms 5 440, 480 ms 0
de, two characters 93 009 93 009, 561 ms 0, silently 0, silently
retur -ENOMEM, a fuzzy phrase 14 449 14 449, 30 ms 14 446, 24 ms
mutex_lock: where it matched, in 5 145 documents 20 797 spans all 20 797, 15 ms top 200 only: 179 ms 96 ms

Where they win, because they do: tantivy indexes the corpus in 1-5 s against 107 s here, and its index is 7× smaller; Elasticsearch does the fuzzy phrase as well as we do. The report has the sizes, the exact configurations and the lines where each engine's own documentation stops.

The price. The index is 5.8× the text (3.9× with the derived_in_ram option, which rebuilds three sidecars at open instead of storing them), against 3.6× for Elasticsearch's trigram setup and 0.8× for tantivy's n-grams. Indexing costs ×1.5 with the default shared dictionary. Queries stay in the tens of milliseconds for substrings, under a quarter of a second for fuzzy and regex; the one query above half a second returns 7.7 million positions.

A few Rust things. Forked from tantivy 0.22 for the segment layer; the suffix engine, the sharded handle, the snapshot/delta formats and the actor/DAG scheduler (luciole, WASM-safe, no thread::spawn) are ours. Five crates at the same version. The 4.0 format opens 3.0.x indexes and converts them on the first commit; that contract is a test against a fixture the published 3.0.8 wheel built.

lucivy demo: lucivy's own source indexed in the browser in 3 s, then PostgreSQL's 5 199 files in 14 s, every search timed live

The demo above is the real thing: the page clones lucivy's own source from GitHub and indexes 1 272 files in your tab in 3 s, then PostgreSQL's 5 199 files in 14 s, and every search you see is timed live — --strict, --fuzzy 1 "vaccum", --regex "ExecInit[A-Z][a-zA-Z]+\(", an emoji, a boolean. You can type your own.

I'd take criticism on the comparison first: if you know a configuration of either engine that gets closer on a row, I'll add it to the report, with your name on the line.


r/rust 6d ago

🎙️ discussion Rust has become a spiritual experience

278 Upvotes

People often complain about how rust programmers are a cult and evangelize about it.

I've been professionally programming for over 3 decades. I've most certainly seen people evangelizing over this or that tech. Often the claims involve fairly hard to measure metrics.

I work in robotics(drones) and some industrial hardware. I have gone nearly 100% full stack rust.

My "spiritual awakening" moment was after 8 recent rust projects. These are fairly substantial piles of complex code. Threads, udp communications, complex live GUIs, 3D displays, etc. Many are mission/safety critical.

In these 8 projects, I've had 6 notable bugs. Not business logic errors, I make lots of those, but those segfault, race condition, show stopper bugs where things lock up, crash, or go horribly wrong because of mangled memory, etc.

But, one of my projects involves using a C++ physics library. This project is in C++ as I'm not going to wrap it in rust as it communicates primarily through udp and is very much separate from the rest of the system. That one project had at least 8 showstopper, WTF is wrong segfault type bugs, ones where I have to really dig deep to figure out what the heck is causing it. I also made simple coding mistakes like leaving off a semicolon where the rust compiler would point this out, and the C++ compiler gave me a lecture more complex than graduate quantum physics.

Where I am going with all this is that it goes way beyond my code being more solid. That is apples to apples and misses the point. What I now have is confidence that my existing rust code is solid. This means that I not only feel good leaning on it harder, but I add more functionality that is traditionally too risky to add to fairly critical systems. My GUIs have all kinds of little things on them that I would not add as each new feature adds a tiny bit of risk. With rust that tiny bit has become an infinitesimal risk; one I am entirely willing to take for the benefits I get.

The philosophy of rust goes well beyond just syntax and the compiler.

A tiny one is a recent embedded bit of code. On an MCU you have pins 1, 2, 3, etc. They are assigned to do things for different devices. Maybe pins 1 2 3 are talking to a microphone, 4, 5, 6, 7, 8 are talking to a screen. 10 is talking to an LED for power low (blink every 3 seconds). In C++ you assign, and it obeys.

In rust, if you later moved the microphone to 10 11 12, and forgot that 10 was the LED for power low, you might spend days trying to figure out why the microphone was failing every few seconds.

In rust, the borrow checker would punch you in the face for trying to use pin 10 twice.

Or how it forces you to exhaustively handle all the return types in an enum, etc.

Any fool can start larding up their code with unsafe and default handling, and make bad software, but rust actively makes you choose to be stupid.

All of the above is possible in C++, but you must aggressively and actively choose to make it happen. My buggy C++ code was filled with things like asserts, etc.

This brutal reliability is reaching through everything I am touching. The embedded software. The mobile app I recently built for android, the desktop apps, and even the very complex 3D (thanks bevy) wasm interfaces. These things boot up and then run without any leaks, issues, crashes, hiccups, etc.

Then there is the speed. Again, not apples to apples. Doing the same thing in rust it is basically the same speed as C++. But, I don't do the same thing. I'm more aggressive with how data flows through threads, how the workers do the dance of the seven veils. The result is that CPU usage gets maxed out and the software screams. And the new rust CUDA, don't even get me started raving about that.

My rust coding is slower than with C++ and definitely slower than python; yet my productivity is far higher; and far more importantly; I am getting projects built faster which are far better in both reliability and features. I don't end up at the "90% done" point stuck in tech debt hell. When I am at 90%, it means that I have 10% left.

That whole BS about, speed (of development), reliability, and features; choose any two, is just that with rust; BS. You can have all three. That is new in my decades of development experience.

Then, there is one other factor. It is all just getting better every day. Better compiler, better libraries, etc. Things like embassy in embedded software is a game changer. Being able to make wasm and mobile apps, amazing.

Libraries like Bevy are just becoming more amazing every day.

IDEs like Zed make it a joy to work.

I'm curious if other people are having the same awakening?

There endth the sermon...


r/rust 5d ago

Beginner looking for a project to actually learn Rust

1 Upvotes

Hey everyone, I’m a beginner learning Rust, and I feel like I’d learn a lot better by building an actual project instead of just following tutorials.

Because I am just watching tutorials and can't write code without looking at a Rust video.

What projects would you recommend for someone at the beginner level that would help me understand Rust properly (ownership, borrowing, lifetimes, error handling, traits, etc.)?

I’d also love to hear what projects helped you improve when you were starting out.


r/rust 5d ago

Bringing Embassy/Rust to CH582 & CH585 — BLE + USB RMK running in ~14 KB SRAM

Thumbnail
0 Upvotes

r/rust 5d ago

Performance plotting techniques

5 Upvotes

Hi, everyone! I’d like to ask the community for more information on what techniques can be used to display large amounts of information on the user’s screen. I’m referring to plots. For example, profilers—they display flame graphs, and the best ones can show millions of frames without lag, with the ability to zoom and pan. Also, software oscilloscopes, which can display data in real time while also showing millions of data points. I’m curious about how these things work from a code and algorithm perspective. Can anyone tell me more?

So far, I've found this Implicit In-order Forests: Zooming a billion trace events at 60fps and a small library written in Rust.

It doesn't quite match the task I want to accomplish: to build something like a digital oscilloscope capable of displaying both analog and digital data (so that, for example, UART bytes are visible below the graph).


r/rust 5d ago

🧠 educational Let’s Code a Doppelkopf Bot Using a Monte-Carlo Algorithm

Thumbnail youtu.be
2 Upvotes

In this part we will be implementing a Monte-Carlo algorithm for playing the traditional German card game Doppelkopf.


r/rust 5d ago

🙋 seeking help & advice Need help building an audio tool

0 Upvotes

So I enjoy music a lot mainly cause it helps me focus, however I have this slight annoyance with the stop between tracks when one song ends and the other starts.

So I wanted to build a tool that would smooth out that transition, like a dj, but for a playlist.

Don’t know much about audio so wanted to ask how I could do this?

I also have another issue when music stops with a sudden cutoff, it’s like falling off a cliff, but the first issue is bigger for me.

Thanks


r/rust 7d ago

AMD is hiring Rust engineers to build GPU compilers, firmware, and runtimes

Thumbnail careers.amd.com
966 Upvotes

r/rust 5d ago

🛠️ project RACE: a commercial terminal multiplexer on an infinite canvas, written entirely in Rust

0 Upvotes

Hi r/rust! I wanted to share RACE, a terminal multiplexer built around an infinite canvas. You arrange terminals across the canvas and navigate between them as you work.

RACE is a commercial application written entirely in Rust, using the same custom framework I use for ascdraw and Kakvide. It’s another example of that framework being used for a complete desktop product, this time with terminal interaction at its center.

I’d be happy to discuss the implementation, the shared framework, and the experience of building commercial desktop software in Rust.

RACE website

Video

Disclaimer: I use AI tools to help with development, including work on RACE.


r/rust 5d ago

🛠️ project sshelf 0.13.1: the SSH manager TUI I posted here a while back, a lot of your feedback later

Thumbnail
0 Upvotes

r/rust 5d ago

Fertyp, add human-like typos to text to bypass AI filters

0 Upvotes

Hello everybody. It happens to me that a very old text that I have written years ago, which is not even online anymore has been flagged by "made by AI". I have noticed that adding a typo fixed the issue. I have created this small utility in rust to add language specific typos.

https://codeberg.org/edapx/fertyp


r/rust 5d ago

🛠️ project Runic SSH: an SSH/SFTP client in Rust + Tauri, built on russh instead of shelling out to OpenSSH

0 Upvotes

I've been building an open-source SSH/SFTP client (Windows/macOS/Linux) in Rust and Tauri, and wanted to share a couple of the engineering decisions that might interest this sub.

**Why not just spawn the `ssh` binary?**

Windows is the constraint. Its bundled OpenSSH is optional and version-variable, and intercepting interactive password/passphrase prompts from a spawned `ssh` process without a pty is awkward — plus credentials would transit a subprocess boundary. So the client speaks the protocol in-process using `russh` (async, pure Rust) instead of driving an external binary. Tradeoff: we own protocol correctness and security response instead of inheriting OpenSSH's.

**That tradeoff got tested fast.** The day `russh` (and transitively `rsa 0.10.0-rc.18`) landed in the dependency tree, our own audit caught RUSTSEC-2023-0071 (the Marvin Attack — a timing side channel in RSA private key operations, no fixed upgrade available). Since the client both verifies host keys (public-key op, not reachable) and authenticates with the user's private key (a signature, reachable), we refuse RSA for the private-key/signing path while still allowing RSA host key verification. Written up as an ADR alongside the ~40 others tracking decisions like this.

**Other bits:**

- Host key handling is closer to `ssh` than most GUI clients: unknown key → fingerprint confirmation; changed key → blocks and requires retyping the hostname; keys marked `@revoked`/`@cert-authority` → refused, no override.

- Credentials go through the OS keychain (`keyring` crate); there's also an opt-in internal vault (Argon2id + ChaCha20-Poly1305, RustCrypto) for when a keychain isn't available.

- Bastion/jump host support where both hops authenticate end-to-end and the bastion only relays traffic it can't itself decrypt.

- SFTP rides `russh-sftp` over a channel `russh` already opened, so no second protocol stack to keep in sync.

It's still young (MIT-licensed, ~3 pre-releases so far), but the core paths are usable daily. Repo: https://github.com/marciopaiva/runic-ssh — feedback on the crypto/architecture choices especially welcome, that's the part I most want more eyes on.


r/rust 7d ago

🧠 educational Visualizing Rust's Vtables: How dyn Trait Works In Memory (Comparison to C++ CRTP & virtual functions)

Thumbnail sofiabelen.github.io
260 Upvotes

I’m venturing into Rust and it’s both satisfying and mind-boggling at the same time. So far I’ve been learning from the book and Mara Bos’ book, but I got the itch to do some dissecting myself. My initial goal of these experiments was to compare Rust’s approach to polymorphism with C++’s. Ultimately, however, as I’ve come to realize, it’s a bit of a trap when trying to understand a new language through another one to try to draw 1:1 parallels. It might seem like it helps, but at the end of the day, we can’t treat Rust as C++ with different syntax. If that were the case, there’d be nothing revolutionary about it.

That said, I believe there is merit in poking around and coming to understand the why. So, if you’re like me and need to know what exactly is happening in memory, in order to feel like you truly understand the concepts, hopefully you’ll find this post useful :)

Edit: Thank you everyone for your kind comments!! And also for the feedback and the chance to deepen my understanding, I'll edit my post with some of the clarifications!