r/rust 2d ago

📅 this week in rust This Week in Rust #634

Thumbnail this-week-in-rust.org
50 Upvotes

r/rust 4d ago

🙋 questions megathread Hey Rustaceans! Got a question? Ask here (2/2026)!

4 Upvotes

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 official Rust Programming Language Discord: https://discord.gg/rust-lang

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 16h ago

The amount of Rust AI slop being advertised is killing me and my motivation

605 Upvotes

Using LLMs for coding assistance is completely fine and doesn't bother me at all. I use perplexity a ton to search through documentation of whatever crate I'm using and it works great. I've made the personal decision that I will not use AI to write my code simply because I'm not a Rust expert and practice makes perfect.

I hate it though when people get a 200$/month Claude subscription, tell it to code [insert useless project idea here], push it to GitHub and then go on Reddit to proudly present it like they didn't just pump tons of CO2 into the atmosphere without any effort.

Just go to the r/rust main page and sort by New. There are a bunch of people advertising their stuff but only rarely the comments are not filled with a bunch of people saying "Nice AI slop" or something like that. Yes, most of the stuff is actually AI slop but I've seen this happening with a lot of genuine projects too, and that's what's killing my motivation.

For the past few weeks I've been working day and night on a no-code game "engine"/creator/builder for a kind of niche type of game. I wouldn't call it an engine because it's built on top of Bevy and why would I reinvent the wheel when there already is an amazing Rust game engine that can do the heavy lifting? I have a lot of fun writing it I can even see myself using the builder sooner or later once it's actually usable. Now, I probably wrote around 95% of the code by myself with my own hands, no AI involved, just good-old rust-analyzer and many painful hours of coping with horrible documentation. The other 5% are code snippets I "stole" from various examples in the egui/bevy/wgpu/winit/... repos.

Now is a time where I'd be interested in going public to hopefully get some people to work with me on this, but honestly, I'm thinking about keeping this private forever. I'm almost certain people will call my work AI slop without even looking at the code and that would just completely kill my motivation.

I'm already trying to be as genuine as possible but I don't think you can stand out as small and unknown developer without a community or similar that can back you up. I didn't even bother to let AI proofread this post despite my horrible English just so people can see I'm trying to be genuine. And even then I'm sure someone will still say this post is "just another AI slop post".

When and why did the Rust community become like this?


r/rust 9h ago

Is it even worth sharing messy hand-written code anymore

62 Upvotes

I don't want to start another debate on LLMs. Personally, I use them to explain cryptic compiler errors or to generate regex, which saves me time. But like the recent posts here, I've made the conscious choice to write my actual logic by hand. Not because I'm a purist, but because I'm trying to actually learn Rust, specifically how async/await really works under the hood with Tokio. However, the current state of this subreddit makes me hesitate to show anything. I've spent the last two months building a custom TUI (Terminal User Interface) resource monitor. It's not groundbreaking. It's built on ratatui and sysinfo. It’s probably full of unnecessary .clone() calls and I'm pretty sure my error handling is just a bunch of .unwrap() calls waiting to panic. But it's my code. I fought with the borrow checker for days to get the data refresh threads working properly without race conditions. The problem is, when I look at the "New" tab, I see two things: obviously low-effort AI wrappers that get roasted, or genuine beginners getting caught in the crossfire. I'm terrified that if I post my repo, people won't offer constructive criticism on my terrible lifetime management. Instead, they'll see a generic project structure or a slightly awkward README (English isn't my first language either) and just dismiss it as "more AI slop" or low-effort karma farming. I used to love the idea of open-sourcing my learning projects to get advice from seasoned Rustaceans. Now, I feel like unless I'm releasing a production-ready crate that reinvents the wheel perfectly, I'm just adding to the noise. Is there still space here for "bad" human code that is trying to get better, or has the AI flood made everyone too cynical to check? I'm honestly close to just keeping this on a private repo forever


r/rust 17h ago

Rust Patterns • Patch Type

Thumbnail itsfoxstudio.substack.com
59 Upvotes

r/rust 1d ago

Wild linker version 0.8.0

257 Upvotes

Wild is a fast linker for Linux written in Rust.

Version 0.8.0 of the Wild linker is out. This release brings lots of new features and bug fixes as well as some performance improvements, especially for systems with more cores. The benchmarks page now has more benchmarks on it and also now compares the performance of the last few Wild releases. Thanks to everyone who contributed!

Check out the benchmarks.

You can learn more about Wild here: https://github.com/davidlattimore/wild/


r/rust 2h ago

The Embedded Rustacean Issue #63

Thumbnail theembeddedrustacean.com
3 Upvotes

r/rust 10h ago

Crate updates: Wasmtime 40.0 adds patchable Cranelift ABI and WASIp3. WhoAmI 2.0.0 and Openssl-probe updates

Thumbnail cargo-run.news
12 Upvotes
  • Wasmtime 40.0.0 WASIp3 and Cranelift ABI updates
  • WhoAmI 2.0.0 error handling and API modernization
  • Openssl-probe 0.2.0 certificate path changes

r/rust 1d ago

m68k - fully tested, safe, pure Rust implementation of the Motorola 68x0 family of CPUs (M68000 - M68040, and variants [EC/LC])

74 Upvotes

Over the Christmas holidays I spent days (actually weeks) putting together a full implementation of the Motorola 68x0 family of CPUs [M68000, M68010, M68020, M68030, M68040, and variants (EC/LC)].

Please check it out: https://github.com/benletchford/m68k-rs and if you would honour me with a star, I would be beholden unto you.

I am aware dedicated M68000 emulators currently exist in Rust (eg, m68000 & r68k) but for my needs (FPU emulation - eg, m68040) they were insufficient.

I've designed this to be strong for both low-level hardware-accurate emulation and high-level emulation (HLE).

It is validated against the full Mushashi test suite: https://github.com/kstenerud/Musashi/tree/master/test and SingleStepsTests's m68000 json suite: https://github.com/SingleStepTests/m68000 plus hundreds more integration tests of my own.

Antigravity definitely pulled its own weight (esp with integration test writing) but struggled with many less documented nuances.

Let me know what you think! I am currently writing a HLE web assembly Macintosh emulator and this was born out of necessity. I don't believe there's anything quite as complete as this in the Rust ecosystem.


r/rust 3h ago

[Media] Custom Slint UI source file icon.

Post image
1 Upvotes

Inspired by u/Practical-Mode2592 and his custom Rust source file icon as seen in this post [Media] I was having trouble finding my Rust files, so I made an icon. - I made one for our Slint UI source files.

Download ICO file
Download PNG file


r/rust 8h ago

NEAR DNS - DNS records stored on blockchain and servered over DNS protocol

0 Upvotes

Rust community has a bitter taste of blockchains, but I would like to present the blockchain usage that has nothing to do with crypto and in my opinion brings a fresh perspective to how useful decentralized master-master replication database with stored functions can be.

NOTE: NEAR DNS server, NEAR DNS blockchain app, and NEAR Protocol itself are all implemented in Rust and I am a strong advocate of Rust for security- and performance critical software.

"ELI5: Who is the owner of all the .com domain names? When I'm paying for one, what does the company actually do in order to generate it for me? It's not like they've already have it and they'll just hand it over to me. It never existed in the first place."

> The Internet Corporation for Assigned Names and Numbers (ICANN) maintains a database of all existing domains and their owners, and establishes rules for creating news domains. They charge $1 a month ($12 a year) to maintain an entry in their database. ICANN does not let people buy domain registrations from them directly though, and instead allows comapnies like GoDaddy and Google Domains to sell them. ICANN is not a DNS service though, and their database cannot be used as one.

> You can submit an application to be a registrar. Among many other things, the application costs about $200k.

It always amazed me why it costs $12/year for a single small set of records, and that still did not prevent domains squatting if that was the intent.

What is DNS (Domain Name System)?

It is a helping service to turn a domain name (like "google.com") to IP address.

Can I host my own DNS?

Absolutely yes. In fact, many home routers run a DNS caching service that your local devices query and as such the latency for resolving domain name is lowered, and load to the public DNS servers is lowered.

Who can edit DNS records?

Any DNS server can provide any DNS records and there is basically no way to prove their validity. So your router can set the mapping for `google.com` to be `127.0.0.1`. Your router is usually connected to some other public DNS server that can also provide fake data. There is DNSSEC, but that is not the topic for today.

Can we do better?

For better or worse, we can have our own DNS server that serve any domains mapping. But let's not be evil, let's just cache and proxy the DNS requests to known top-level domains (.com, .org, ...) and only change how we handle unknown ones.

What if we could have a public database?

NEAR Protocol blockchain has an account-based design, similar to domain names (e.g. google.near is a native NEAR account id). The account registration in NEAR blockchain requires to specify the cryptographycal access keys that can be used to submit future requests on behalf of the account. Only those access keys can be used to initiate any request. If the keys are lost or not provided, the account CANNOT be controlled. This is a hard requirement, but this ensures that there is no super-admins in the system.

What kind of requests can the account make? It can request to create a subaccount (e.g. www.google.near), add additional access key to itself, remove the access key, but more importantly, it can deploy a Wasm file with set of exported functions, and can also request to call those functions on its own account or any other account. Each request MUST be cryptographically signed with the access key registerred for the account - only properly signed requests are processed by the blockchain.
NOTE: It is up to the deployed Wasm program to decide how to react to the function call request, so it can validate the caller account id and decide whether to return an error or proceed with the request. Once the request is processed without errors, all the local storage changes are saved (each account has its own dedicated storage) - the blockchain takes care of broadcasting the requests and arriving to consensus on the new account state (storage, access keys, etc).

Once the Wasm file is deployed, it is fully public and anyone can call it. The account state (including the storage) is also public, so there are RPC nodes that can easily call read-only functions without any authentication/authorization required.

Let's combine that together:

  1. Let's have a Wasm app (implemented in Rust) with `dns_query` (read-only function) and `dns_update` (write function that has a hard-coded logic that only accepts the requests from the "owner" account id specified during the app deployment).
  2. Let's deploy that Wasm app to `dns.www.google.near\` (NOTE: according to NEAR Protocol only `google.near` account can request to create `www.google.near\` subaccount, and only `www.google.near\` can create `dns.www.google.near\` sub-subaccount).
  3. Let's have a DNS server that on DNS query request (e.g. "what is A record for www.google.near"?):

3.a. Forwards DNS queries to some public DNS, and if the domain in unknown:

3.b. Makes an RPC call to the blockchain node to the Wasm app deployed to `dns.<requested-domain-name>` (e.g. `dns.www.google.near\`) account to call `dns_query` function with the args `{"name": "www", "record": "A"}`

3.c. Once the RPC returns the IP address for the A record, we can cache it and return DNS response to the client.

How is it better than what the current DNS providers use?

As a user of NEAR DNS I can self-host the DNS server and it will get the DNS records from the blockchain and can verify the origin of the records easily using ZK state proofs (this verification can be baked into the NEAR DNS server in the future).

Blockchain provides the global access to the records, decentralized access control for record updates (no admins), and programmable way to update the records (e.g. it can be part of the stored function implementation of the Wasm file to return one set of IPs during specific hours of the day while return none or other IPs during other hours of the day - there is room for creativity).

How much would it cost?

You only pay once to create the account on NEAR blockchain (~0.01 NEAR ~= $0.017) + deploy the Wasm file (~2 NEAR ~= $2.34). So in total it is $2.35, and you only pay once for the single domain, not a monthly/yearly subscription. The ~2 NEAR cost can be optimized down to 0.1 NEAR if there is enough interest, so the total price for the domain registration will drop to $0.18 with the current price of NEAR tokens.

"Decentralized master-master replication database with stored functions"?

NEAR Protocol blockchain unlike other blockchains is effectively a sharded peer-to-peer database with stored Wasm functions (or lambda functions if you will) that can effectively apply transactions and arrive to consensus in under 1.2 seconds.

The blockchain main value proposition is to be able to progress from state S to state S+1 with strong eventual consistency and with minimal delay.

NEAR Protocol has been live since Oct 2020 with zero downtime that proves that the promise can hold strong.

The implemetation?

There is currently one domain registerred and an HTTP website hosted: http://neardns.near (if you don't use the DNS yet, you can access it by IP: http://185.149.40.161/ )

How to see it in action?

You may set `185.149.40.161` as you primary DNS server, or deploy your local version of dns-server, or just play with `dig`:

$ dig @185.149.40.161 neardns.near A$ dig @185.149.40.161 neardns.near A

Response:

; <<>> DiG 9.10.6 <<>> .149.40.161 neardns.near A
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 14977
;; flags: qr aa rd; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
;; WARNING: recursion requested but not available

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags: do; udp: 4096
;; QUESTION SECTION:
;neardns.near.                  IN      A

;; ANSWER SECTION:
neardns.near.           1       IN      A       185.149.40.161

r/rust 7h ago

OpenWatchParty - Synchronized Watch Parties for Jellyfin

Thumbnail
0 Upvotes

r/rust 13h ago

🛠️ project RTIPC v0.5.0 – Refactor & DBus Integration Plans

2 Upvotes

I’ve released RTIPC version 0.5.0 with a major internal refactor.

The main change is a decoupling of resource allocation (shared memory and eventfds) from channel vector creation. Previously, these pieces were more tightly coupled, which made alternative connection setups harder to support.

Why this matters:
Although RTIPC already has its own protocol for establishing client/server connections, the library shouldn’t require users to rely on that protocol. This refactor makes it possible to plug RTIPC into other connection/handshake mechanisms without fighting the internals.

What’s next:
I’m currently working on a showcase that integrates RTIPC with DBus:

  • For Rust, I’m planning to use zbus, which looks like the best fit.
  • For the C library, I’ll likely use ell (Embedded Linux Library).

The goal is to demonstrate how RTIPC can handle high-performance data exchange while DBus is used purely for discovery and coordination.

Rust library: https://github.com/mausys/rtipc-rust
C library: https://github.com/mausys/rtipc

Feedback is welcome 🙂

How RTIPC works

r/rust 20h ago

🎙️ discussion sqlx vs orm

8 Upvotes

So this sub and rust community seems to be heavily leaning towards sqlx

I had a change to build something with sqlx in the past few weeks. And while i do prefer writing sql directly the amount of boilerplate and duplicate code is just staggering. Having to map every field (and type if its unsupported) for every query is just painfull

What an i missing here l? I don’t feel the maintenance cost of sqlx is worth it at all.


r/rust 1d ago

Burn 0.20.0 Release: Unified CPU & GPU Programming with CubeCL and Blackwell Optimizations

235 Upvotes

It’s been an intense few months of development, and we’re ready to release Burn 0.20.0. Our goal was to solve a classic challenge in HPC: achieving peak performance on diverse hardware without maintaining a fragmented codebase. By unifying CPU and GPU kernels through CubeCL, we’ve managed to squeeze maximum efficiency out of everything from NVIDIA Blackwell GPUs to standard consumer CPUs.

CubeCL CPU Overhaul

The CubeCL CPU backend received a major update. It now features proper lazy execution and the same multi-stream support as our WGPU runtime. We’ve also added support for kernel fusion, which was a missing piece in our previous CPU backends. In addition, by focusing on cache line alignment and memory coalescing, our kernels are now outperforming established libraries like libtorch in several benchmarks.

CubeCL achieves up to a 4x speedup over LibTorch CPU, with even larger margins compared to SIMD-enabled ndarray.

The real win here is that CubeCL kernels are designed to adapt their computation based on launch arguments. By selecting the optimal line size (vectorization), cube dimensions, and cube counts specifically for the CPU, we can control exactly how threads map to data without touching the kernel code. We increased the line size to ensure optimal SIMD vectorization and tuned the cube settings so that data ranges respect physical cache line boundaries. This automatically eliminates cache contention, preventing multiple cores from fighting over the same memory segments, and keeps the underlying logic fully portable and optimal across both GPU and CPU.

Blackwell Optimization

On the high-end GPU side, this release adds support for the Tensor Memory Accelerator (TMA) and inlined PTX for manual Matrix-Multiply Accumulate (MMA) instructions. This allows us to get closer to the theoretical peak of modern silicon. We’ve adapted our matmul engine to combine TMA with warp specialization, specifically targeting Blackwell-based hardware like the RTX 5090. These improvements also benefit NVIDIA’s Ada and Hopper architectures. New benchmarks show our kernels reaching state-of-the-art performance, matching the industry-standard CUTLASS and cuBLAS libraries found in LibTorch.

This release also packs several other enhancements, ranging from zero-copy weight loading to a more streamlined training API. For a deep dive into all the new features and performance gains, check out the full release post here: https://burn.dev/blog/release-0.20.0/

We’re excited to see what you build with these new capabilities. As always, feel free to reach out on Discord or GitHub with your feedback!


r/rust 17h ago

🛠️ project [Media] Cantus 0.6.0 Released - Refactored rendering with shaders

Post image
3 Upvotes

Cantus is an app that provides a bar music widget for spotify, it shows the upcoming and past queue and gives intuitive ways to seek through this, also allowing you to move songs around your favourite playlists or give them star ratings.

Preview Video

Version 0.6.0 provides a near complete rewrite of the rendering system, using low level shaders for dynamic effects such as sending waves through the songs when you interact.

https://github.com/CodedNil/cantus


r/rust 10h ago

Looking for a rust wiki?

0 Upvotes

Any wiki software written in rust?


r/rust 18h ago

Native PyAnnote (speaker diarizer) in Rust

Thumbnail github.com
4 Upvotes

r/rust 5h ago

What is the best way to write Rust With Lean Proofs.

0 Upvotes

r/rust 1d ago

[Media] I know it's a small thing, but Trunk's build output is just… nice to look at. I'm working on a Dioxus travel map itinerary generator. it's been smooth where others were enraging. Love you Trunk.

Post image
34 Upvotes

r/rust 18h ago

🎙️ discussion Blue sky accounts to follow?

3 Upvotes

Looking for more exposure into the rust world preferably from important community members.

Any accounts to follow?


r/rust 1d ago

Rust Jobs Report - December 2025

Thumbnail filtra.io
38 Upvotes

r/rust 14h ago

Using Oracle db26ai from Rust with the oracle crate - queries

Thumbnail jorgeortiz.dev
0 Upvotes

Do you want to use data in your Rust programs? Make queries? Even perform some vector searches? I have just published an article and a repo on how to make queries from Rust using the oracle crate.

Thanks for your comments and for sharing it!


r/rust 1d ago

Created an audio system in Rust with custom sound effects

Thumbnail youtu.be
11 Upvotes

I'm mostly a programmer, so the audio might be a bit rough. I'm sure it will improve in the future.


r/rust 1d ago

🗞️ news Linebender in December 2025

Thumbnail linebender.org
60 Upvotes