r/rust • u/carllerche • 4h ago
π questions megathread Hey Rustaceans! Got a question? Ask here (30/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 (30/2026)?
New week, new Rust! What are you folks up to? Answer here or over at rust-users!
r/rust • u/Sharlinator • 10h ago
π οΈ project Retrofire: 90s-inspired software rendering library with strong typing (no_std, no_deps, no_llm)
Hi all,
Given that there's been a lot of discussion about AI projects for a change, I though this is a good point to finally write a post about my very much hand-written 3D renderer retrofire, which I also used as a case study in my recently-accepted M.Sc. thesis titled "Type-safe(r) Model of Geometry in 3D Graphics".
retrofire is (optionally) no_std and has zero non-optional external dependencies. It also contains zero unsafe and, as mentioned, zero lines of LLM-generated or designed code. Last but not least, there are zero emojis :P
Please see the README for screenshots, can't post pictures in r/rust.
Umbrella package: https://crates.io/crates/retrofire
Git repo: https://github.com/jdahlstrom/retrofire
My thesis: https://www.utupub.fi/items/645d25b4-de42-4959-bd50-f96fb98b202a
A tiny example:
```rust
let verts = [
vertex(pt3(1.0, 1.0, 0.0), rgb(1.0, 0.2, 0.0)),
vertex(pt3(-1.0, 1.0, 0.0), rgb(0.0, 0.8, 0.2)),
vertex(pt3(0.0, -1.0, 0.0), rgb(0.4, 0.4, 1.0)),
];
let shader = shader::new(
// Vertex shader
// Transform vertex position from model to clip space
|v: Vertex3<Color3f>, mvp: &ProjMat3<Model>| {
vertex(mvp.apply(&v.pos), v.attrib)
},
// Fragment shader
// Just turn the float color to u8 RGBA format
|frag: Frag<Color3f<_>>, _| frag.var.to_color4(),
);
let dims = dims::VGA_640_480;
// Render into a 2D buffer
let mut framebuf = Buf2::<Color4>::new(dims);
// Move the camera away a bit
let modelview = translate((0.0, 0.0, 2.0)).to();
// Use perspective projection
let project = perspective(1.0, dims.aspect(), 0.1..1000.0);
// Use the whole buffer as the viewport
let viewport = viewport(dims.into());
render(
// Render a triangle with the given vertex indices
[tri(0, 1, 2)],
verts,
&shader,
&modelview.then(&project),
viewport,
&mut framebuf,
&Context::default(),
);
```
r/rust • u/Final-Nerve7787 • 2h ago
π seeking help & advice Learning programming and i choose rust.
I'm stubborn ik, people often jump from other languages like c or python, java to rust but I wasted a lot of time and decided to go the hardest way.. till now I didn't feel like that.. but still if I say why i choose it? idk I see the future with this language probably.. if i learn python or other languages now the market is already filled with all roles.. rust has less jobs in my country but I'd at least try outside right so.
I'm learning basics from scratch the system works and how to code.. and all from gpt.. I've made my mentor and given specific instructions not to break rhythm not to provide code unless i do stuff myself and all yeah it's silly but that's how I learn slow but properly.
ai will eat up everyday then why learn? cause I want to learn that's the answer.. could've gone with any but yeah choose rust. ai will give me code I'm sure if it but I want to know stuff right.
now my question to you all.. ofc about jobs.. as I've seen mostly prefer someone with experience atleast with other langs but here I am.. is there any hope for me? ya ik still choose to learn and the reasons are above.
what projects should I keep doing.. is leetcode neet code imp? cause when I tried learning java back then , I was really really bad at data structures and gave up cause I got a support role but now it isn't for me and I want to learn but yeah practicality matters.
r/rust • u/lord_of_dark_sin • 5h ago
π seeking help & advice Want to practice rust
I just finished the Rust book and I'm starting my second year of college. I want to practice it, so I'm currently doing Exercism exercises. I want to extend my scope. Which website should I go to?
r/rust • u/GyulyVGC • 11h ago
π οΈ project Sniffnet v1.5.1 is out
github.comSniffnet, the open-source network monitoring tool written in Rust, has reached version 1.5.1 that brings connections latency measurements, support for CIDR ranges in IP blacklists, new Sinhala and Hungarian translations of the app by native speakers, and other improvements to the app stability and packaging
r/rust • u/ProfessionalAnt5255 • 17h ago
I built a digital logic circuit simulator in Rust (egui/eframe)
r/rust - I built a digital logic circuit simulator in Rust (egui/eframe)
Hey! I wanted to share a project i made for logic simulation nearly 100% rust and complied to WASM for some blazing fast in browser run times.
here's the link if you want to check it out: https://theta-rnd.itch.io/logic-sim
if you do would LOVE to hear your feed back thanks!
r/rust • u/Illustrious-Cry3877 • 53m ago
π οΈ project Train model Dcc central command station
Dear all, Iβm building DCC-esp32, a no_std Rust firmware for an ESP32-C6 based DCC command station for model railroading, joining my passion for train models and programming (Rust). It's a first version of a command station for bare metal in Rust. Some hw of course is needed. Lot of things remain to do (i.e, desing a circuit for Railcom, adding Can, but I'm not an hw engineer and my skills in hw are at a basic level.
It uses esp-hal, Embassy async tasks, esp-wifi, ISR-driven RMT for DCC waveform generation, Z21-compatible UDP control (a Roco spec(, runtime WiFi provisioning, and early RailCom/POM integration.
I've changed also the big BTS H-birdge with a TI DRV8874 so the circuit is very easy for DCC only at the moment.
Repo: https://github.com/cc90202/DCC-esp32
I've tested with Roco, Trix and RIvarossi models and it's a pleasure to see them running.
Rust is amazing on Esp32.
π οΈ project Polybox: Message passing ergonomics for channels
Hello there!
I have just released the first version of polybox. Polybox provides wrappers around mpsc-channels of flume and tokio (can easily be extended for other channels), to make usage more ergonomic and ease usage of the actor-pattern.
The fundamental idea is that a Sender<T> should not have to care about the actor it is sending to. The only thing that it should care about is the messages that can be sent over the channel. A sender should not care whether it is talking to ProcessA or ProcessB, only that they both accept the same Message. This is exactly what PolyBox provides.
If this sounds interesting, and you have feedback or a use-case in mind let me know! I'm pretty happy with where it's at, but it's still in an early stage.
(No AI was used except for some basic auto-complete)
π§ educational Building custom Polars expression plugins in Rust
The Polars expression plugin system has been instrumental in building the rich functionality of fenic. That part of the system is not super well discussed although it provides amazing opportunities to extend Polars in a performant way without having to fork the project.
I wrote a post going through the things we built on top of Polars with examples from the actual code base.
I thought it will be useful for anyone interesting in extending Polars and/or PyO3 and maturin among other things.
Hope you find it useful!
r/rust • u/gilfyole • 1d ago
π§ educational mmap behind the scenes in a database
savannahar68.medium.comI wanted to write this for probably a year now. I've been using mmap in two append-only databases built in rust and this is everything I learned actually understanding it, including why it works in our favor even though Andy Pavlo's paper says mostly don't use it.
disclaimer: A bit of a long read though.
r/rust • u/PerformanceBulky9245 • 1d ago
π seeking help & advice Is there a way to make learning wgpu less painful?
I started by searching for tutorials and docs to learn wgpu. First, I looked at docs.rs, but itβs dense asf. So I kept looking and foundLearn WGPU. Most of the concepts are explained well, but itβs still kinda dense, and I feel like I'm just copy-pasting code.
so is there a less painful way to learn wgpu?? and do i memorise the syntax or smth?
r/rust • u/emcmahon478 • 3h ago
π οΈ project Comhad: a Ranger-style terminal file browser for S3 (Cyberduck, but in the terminal) - written in Rust
Comhad is a dual-pane terminal file browser, ranger-style navigation, side-by-side local/remote panes, previews, background transfers, sync, etc.
Right now it only talks to S3 (and S3-compatible endpoints), but storage backends sit behind a single trait, so the goal is for it to grow into something like Cyberduck for the terminal. One tool, many backends (SFTP, GCS, Azure Blob, WebDAV, whatever people actually want), rather than another S3-only tool.
Heres a link to the repo, give it a try and a star if you fancy!
r/rust • u/Adohi-Tehga • 12h ago
π seeking help & advice Working on a crate to reduce boilerplate when using tera and actix-web together.
I've been working on a utility crate to make returning Tera templates from actix-web routes more ergonomic and would welcome any feedback. Most of the documentation material I can find seems aimed at using actix-web for APIs and it is very ergonomic for that use case. In a current project, however, I am trying to make a traditional multi-page website, where all responses should be returned as full HTML pages.
I initially started by extracting a tera instance and building context directly in each route handler, but this became quite verbose, especially all the match statements I had to use for proper error handling. To alleviate this, I tried to create a custom struct that hid all of the boilerplate in its implementation of Responder. As it seemed useful, I thought I would extract it out into a crate of its own for other projects, and in the hope that it would be useful for others.
The implementation is still in an early stage (my own project is just 2 pages so far) and could do with some refinement; any feedback on the API design would be welcome! In particular, I feel that Error handling is still not ideal as error responses must currently be returned manually. This is partially due to actix-web not exposing the Request to types that implement ResponseError.
r/rust • u/LibrarianOk3701 • 6h ago
π seeking help & advice The Embedded situation with Rust
So I started learning Rust and went straight to embedded with an ESP32 after being almost done with the book. I had previous programming experience with C++ (mainly in Unreal Engine, which uses its own build system), but I hate CMake, which was the main reason I learned Rust. I used esp-hal, embassy was ok, and all was good until I needed wifi. Tried using esp-radio, and it is so bad. There are breaking API changes from 0.16 to 0.18, which also means they did not follow SemVer, the docs on docs.rs say they failed to build for 0.18 so I am left with having to look for alternatives or use idf with the standard library which uses C bindings and takes ages to build because it needs to compile the underlying stuff too.
Is it just me, or is embedded dev prett painful with Rust because of the young ecosystem?
r/rust • u/Tall-Highway-3439 • 13h ago
π οΈ project meon 0.5.0 - faster, better
github.comr/rust • u/fereidani • 2d ago
Unbounded Channels Are Mostly a Mistake
fereidani.comI would love to hear your feedback, especially regarding the addition of the new API to Kanal before the 0.2 release.
r/rust • u/TarkaSteve • 22h ago
π οΈ project Vicarian v0.3.0 is out, now with native static file serving
Vicarian 0.3.0 is out. Vicarian is a batteries-included reverse-proxy aimed mostly at self-hosting. It has built-in ACME/LetsEncrypt support, including DNS-based certificate generation.
Since I last mentioned Vicarian on here there have been a lot of bug-fixes and a few notable features:
- Serving static files is now supported natively (using the static-web-server crate).
- Prometheus stats are now supported, including ACME time-to-renewal counters.
- Listening on an interface rather than an IP is now supported.
Vicarian should probably be considered alpha for the time-being; although I've been dog-fooding it on a number of sites, I may decide to change the config language; it's currently Corn, but I'm considering a move to HCL or KDL before declaring it beta-ready.
And now the (sadly) obligatory AI statement:
Vicarian has a no-AI-in-production-code rule. A local-only LLM is sometimes used to find and generate tests for missed corner-cases and TDD development, and generation of boiler-plate docs.
r/rust • u/sean_watters • 1d ago
Latest stable release for `ordinary` and `ordinaryd`: v0.10.2
- Templates have been upgraded to
WASIp2 - Improved execution time due to WebAssembly instance reuse
ordinary templates ejectallows for customization of the wrapping component code
RE: performance
Templates from the default ordinary new example.com project running locally (M5 Pro, MacBook Pro) tend to be ~1ms for first request and <500Β΅s for subsequent.
When the LMDB request cache is set ordinaryd logs ~150Β΅s req/res latency.
https://codeberg.org/ordinarylabs/Ordinary/releases/tag/v0.10.2
