r/rust • • 3m ago

How the compiler caught a logic bug I would have missed in any other language

0 Upvotes

I was refactoring a small state machine for handling retries in a background worker. The enum had variants for 'Pending', 'Retrying(u32)', 'Succeeded', and 'Failed'. I added a new 'Cancelled' variant but forgot to update one of the match arms that decided whether to schedule another attempt.

Rust refused to compile until I handled it. In the process I realized my logic would have silently treated cancellation the same as a transient failure and kept retrying. It took maybe two minutes to fix once the compiler pointed it out.

I've had similar moments with Option/Result, but this one felt especially useful because it was a semantic change I introduced myself. Curious if other people have stories of the exhaustiveness check saving them from a real behavioral bug rather than just a missing arm.


r/rust • • 2h ago

🛠️ project Strand: offline dependency and impact analysis in Rust (CSR graph engine + mmap store), looking for design feedback

Post image
1 Upvotes

Hi guys, I've been working on Strand. Strand is a local command-line and GUI tool which can tell you a node's dependencies, and what would happen if those changed. Strand is in Rust and analyses Rust, Python and JS/TS code, and also some lock and build metadata. Nothing is sent outside your computer.

https://github.com/Biggest-Bee/Strand

Functionality

- Analysis of dependencies, analysis of secondary effects (see above), cycle analysis and 'why’, which identifies the minimal chain of dependencies.

- Inter-language relationships where possible.

Design:

- Graphs are represented using a compressed sparse row format. Data is stored in a file and accessed with mmap. [Insert specific data e.g. ‘Analysis of requires Xs initially and Yms to analyse secondary effects for N nodes’.]

- There is single writer access. Multiple readers can mmap the file. I am currently considering how best to handle situations where the file is modified whilst being mmapped (which can cause SIGBUS).

- This is a may analysis and there is no type analysis. Consequently, there are areas which cannot always be analysed – for instance, in JS and Python, calls such as obj.m() on an object created within that code, plus more generally issues of dynamic dispatch.

- For large graphs, the impact analysis is approximate. This is noted in the results.

Please let me know your views on:

  1. Of lock files, temp-file-write/ rename and/or checksum verification upon opening, which do you favour for use with an mmap? What have you found problematic?
  2. Should I first implement a basic name-based function to find function calls, and then add type-aware functionality? Or should I jump to a more sophisticated solution?
  3. Any specific issue relating to my Rust implementation. Perhaps structural or performance related.

I am happy to discuss further the inner workings of Strand.

(in case anyone want to try it out, run these commands: cargo install strand-cli(for the cli), cargo install strand-gui(for the gui), or cargo install strand-gui strand-cli(for both))


r/rust • • 3h ago

Declarative Rust UI with hints of Erlang

0 Upvotes

https://ljos.dev/

Fun, declarative, fast UI framework. Perfect for use with AI agents, writing your own code, or maintaining and debugging it.

By using shells, you or your users can restyle it however they want, as the website demonstrates.

Use TypeScript for scripting if you want, but you can also go Rust only.

Using some of the amazing capabilities of egui ( native ) and Solid.js 2.0 ( web ).

We also have a basic studio app for wysiwyg.

But how well it does depends on you, if you like it and want to use it. This project couldn't exist unless a lot of people had built the fundamental building blocks I'm putting together.


r/rust • • 5h ago

Where does tail latency actually come from in a thread-per-core Rust service?

0 Upvotes

We're building a streaming server in Rust that runs one shard per core with io_uring, and in benchmarks our p99.9 stays close to p99. But those runs were on local NVMe with hugepages, a single node, below saturation, so we honestly can't tell how much comes from the design and how much from the setup.

For those running thread-per-core services in production: what actually brought your tail latency down, and what made it creep back once real traffic, more nodes or noisy neighbours showed up?


r/rust • • 5h ago

🛠️ project CUDA memory allocator using Rust 1.100 Allocator trait

0 Upvotes

When Allocator trait was finally stabilized I thought to make use of it. I'm working on a AI/ML framework that has some cool ideas behind it, and also provide good tools to work with NVIDIA ecosystem. The primary backend is CUDA, at least for now.

The Allocator-implementing CUDA allocator is called PinnedHost. You can find it on:

The only way I think it makes sense to use the allocator trait with a GPU is CUDA host pinned memory. Maybe somebody has more ideas.

Pinned (or page-locked) memory is host RAM that the OS doesn't move or swap out. GPU memory from cudaMalloc can't be read from the CPU. CUDA "managed memory" can be read from CPU and GPU, but it's possible to cause a segfault while a kernel runs. Pinned memory seems the only way to use std allocator trait.

Here's how to use it, given a CUDA context and a stream:

let pinned = context.pinned_host();
let mut input: PinnedVec<f32> = Vec::new_in(pinned.clone());
input.extend((0..4096_u16).map(f32::from));

let mut device = DeviceMemory::<f32>::zeroed(&context, input.len())?;
stream.sync_scope(|scope| device.copy_from_pinned_scoped(&input, scope))?;

You get a Vec that CUDA can copy to and from asynchronously, with no staging copy. The GPU can't read normal pageable memory directly (DMA). When you copy from a Vec, CUDA first copies the data into its own pinned buffer and transfers it from there (this is called staging). That costs time. Pinned memory allows the GPU to use the buffer directly.

The copies are scoped in sync_scope, which waits for the stream to finish before it returns. The allocator can't know what GPU is doing with the memory. E.g. if you drop PinnedVec while a copy from it was running, its memory would go back to the pool. The next allocation could then get the same memory and overwrite it while the GPU is still reading it.

This is part of my AI/ML framework "Singe": https://github.com/tinrab/singe


r/rust • • 6h ago

I replaced Linux on my home router with a pure #![no_std] bare-metal Rust OS (zero C, zero floats, live on fiber)

Thumbnail ayeos.com
0 Upvotes

Happy Thanksgiving r/rust!

For the past stretch I’ve been running **AyeOS / AyeFire** (`seq=125`) — a pure `#![no_std]` bare-metal Rust operating system — exclusively as our real home router on Verizon FiOS carrying 30+ devices, streaming, and Wi-Fi 7.

Link + unedited 20s physical HDMI boot video + 30s QEMU boot instructions: **https://ayeos.com**

### The Rust / Bare-Metal Stack

- **Zero-C UEFI Boot (`AyeBoot v0.2.0`):** Pure Rust bootloader (`check_zero_c_boot.sh` verified) that arms the Intel iTCO hardware watchdog, validates a **3-of-4 Ed25519 quorum** signature over the **6.1 MiB** kernel, and hands off to bare metal in <300 ms (~20s BIOS-to-live-FiOS).

- **16/16 SMP & Direct Silicon:** Intel I226-V RX/TX rings, lock-free 32bpp 1080p HDMI framebuffer (`QWave` `[F1]` / Firewall `[F2]` / Silicon `[F3]`), bounded C64-style memory layout, and A/B rollback slots.

- **Pure-Rust Networking & Real Bugs Fixed:**

- `0.65 ms` LAN ping (0% loss), `0.74 ms` DNS cache hits, `8h 28m` zero-crash soak (`48–50°C` MSR thermals).

- Wrote full **RFC 2131 T1/T2 WAN DHCPv4 lease renewal** in pure Rust after our FiOS 2-hour lease dropped overnight (`renewals=1`, zero downtime).

- Traced an Apple TV movie-night pause straight to an overly aggressive kernel connection gate (`held=0` across 17k+ checks) while keeping IoT cameras isolated (`iot_budget=0`).

- Built-in pure-Rust local UniFi Wi-Fi 7 controller (5/5 APs/switches verified).

- **Zero-Float Exact Math (`AYETLM01`):** Instead of FP32/cloud inference, local anomaly classification uses exact `p/q` rationals and balanced ternary `{-1, 0, +1}` (720,896 trits packed in SPQT Base-243 running at **525 tok/s on CPU**, 73 tok in 139 ms). Four strict architectural walls separate local learning from kernel/policy authority.

### What’s Live Today vs. Next

- **Live today:** 7.7 MiB USB / QEMU UEFI image (`seq=125`, SHA-256 + 3-of-4 signed OTA manifest), interactive zero-float BigInt `p/q` browser workbench, and research library (`library.8b.is`). Core offline router stays free forever.

- **Next gates:** Clean **Apache 2.0 kernel source drop** (final secret/history scrub underway — alerts via `/feed.json`), wider x86_64 PCIe/Wi-Fi matrix, FiOS DHCPv6-PD, and AArch64 bring-up (RPi 5 / CM5 / Apple Silicon) — the arch-independent `ayefire-*`, `ayeos-tlm`, `ayeos-dns`, and `mem8-*` crates already compile cleanly.

Happy to answer any `#![no_std]`, UEFI, NIC ring, or zero-float ternary questions! `{<3,<3,<3}`


r/rust • • 6h ago

📅 this week in rust This Week in Rust #679

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

r/rust • • 7h ago

I love the complier and its hints

18 Upvotes

I just started learning Rust and running cargo check every now and then has helped me find typos, small syntax errors, or other general information I can't seem to find until it's pointed out.

Something like this is simple, but I didn't see the syntax issue until running it:

error[E0308]: mismatched types
  --> src/commands/holdings.rs:86:19
   |
86 |         .find(|p| p.kind = "DEFAULT" && !p.deleted)
   |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `bool`, found `()`
   |
help: you might have meant to compare for equality
   |
86 |         .find(|p| p.kind == "DEFAULT" && !p.deleted)
   |                           +

I've really been enjoying my time with Rust and taking it slow!

Another example:

error: format argument must be a string literal
  --> src/commands/holdings.rs:66:14
   |
66 |     println!(breakdown_body.len());
   |              ^^^^^^^^^^^^^^^^^^^^
   |
help: you might be missing a string literal to format with
   |
66 |     println!("{}", breakdown_body.len());

r/rust • • 7h ago

🙋 seeking help & advice Started a Rust blog

Thumbnail asaft.dev
0 Upvotes

Hi rustaceans,

I have started a blog with the purpose of writing Rust oriented content.

I have been mostly using Rust for the last 2 years and
I think I can share some insights with other members of the community.

How do you guys feel about the overall look, any suggestions or reprimands?

I was thinking of writing an allocator in the near future and documenting the implementation (seems like a fun experiment with the stabilization of the Allocator trait as well).


r/rust • • 9h ago

Rust Git Tower

0 Upvotes

r/rust • • 12h ago

🧠 educational I wrote a step-by-step tutorial to learn Rust by building a small Paint app from scratch

Thumbnail buildyourownpaint.com
247 Upvotes

Hi guys ! I have been a Rust enthusiast for a few years now, in my learning journey I wanted to learn by doing so I tried to make a Paint like app since I was interested in graphics and rasterization concepts, and it helped me understand a lot of Rust concepts and their purpose.

These last few weeks I thought I'd clean up my old project and make an educational tutorial for beginners or people who read the first Rust Book chapters and want to get some hands on experience to get the concepts down.

The tutorial is on Build Your Own Paint in Rust, it's organized into 12 easy to follow chapters that cover many concepts (2D vectors, mouse and keyboard input, shapes, colors, images, etc.) with additional exercises in every chapter for more learning, and some ideas at the end of the project to go further and explore different paths with some help on where to start.

I really hope this helps new learners to get an easy start in their Rust journey and see the beauty of the language ! :)


r/rust • • 16h ago

Building a Query System - Arya Dradjica | EuroRust 2026

Thumbnail youtube.com
6 Upvotes

Ever wondered how a compiler remembers what it already worked out? 🤔

At this year's EuroRust, Arya walked us through how she built her own query system for a new Rust compiler and put it up against salsa. Check out the new video! 🦀

In 2027 EuroRust is going to Prague! Learn more and get your ticket at eurorust.eu.


r/rust • • 17h ago

📸 media Qt Bindings compared: CXX-Qt vs Qt Bridge

Post image
86 Upvotes

Hey there!

I'm one of the developers of Qt Bridge (https://crates.io/crates/qtbridge). One of the questions we receive most often (aside from licensing) is what makes Qt Bridge different from CXX-Qt.

This takes more than a couple of lines to explain and is best illustrated with an example, so I wrote a blog post about it: https://www.qt.io/blog/rust-bindings-cxx-qt-vs-qt-bridge

We hope it demonstrates the strengths and value of both crates. As always, let us know what you think!


r/rust • • 20h ago

Advanced Projects in Networking with Tokio

11 Upvotes

Hey everyone,

I've been learning Rust and recently started exploring concurrency and asynchronous programming with Tokio. Im familiar with the fundamentals of ownership, lifetimes, channels, synchronization primitives, and task spawning.

I want to deepen my understanding of Tokio by building a non trivial networking project rather than just following tutorials or reading documentation.

What networking projects would you recommend for someone looking to develop a deeper, practical understanding of asynchronous Rust? I would also love to hear about projects youve personally built that helped you understand these concepts better.


r/rust • • 23h ago

🙋 seeking help & advice Considering Rust for backend services handling 10k+ req/s - real experiences with dev velocity?

6 Upvotes

I'm evaluating languages for a new internal backend service that needs to sustain high throughput with strict latency requirements. Rust keeps coming up because of its performance profile and lack of GC pauses, but I'm curious how it actually plays out in practice for teams.

Specifically:
- How much slower is initial development compared to something like Go or Kotlin when you have to fight the borrow checker on complex request/response flows?
- Once the core logic is in place, do you see meaningful maintenance wins from the type system (fewer runtime surprises, easier refactors)?
- Any gotchas with common patterns like connection pooling, structured concurrency, or observability that eat into the perf advantage?

Not looking for "Rust is the best" takes

- more interested in concrete tradeoffs people have measured on similar workloads. If you've shipped something in this range, what surprised you (good or bad)?


r/rust • • 1d ago

If you're gonna vibe the UI, don't just follow the agent recommendations

0 Upvotes

Yes, gpui is nice and egui is quick to start with. Yes, Claude.

Discord gpui app is interesting, and artcraft egui app is wild.

There are alternatives out there like slint. If you can afford the tokens, just consider them, as well, and then compare.


r/rust • • 1d ago

🛠️ project Moving a terminal app from Tauri + React to GPUI - the numbers and the ugly parts

25 Upvotes

I moved muxflow* from Tauri + React to GPUI. The desktop app is now 100% Rust.

Results, before any optimization of the GPUI version:

- Idle memory: 417 MB → 98 MB (76.5% lower)

- Idle CPU: 3.5% → 1.4%

- Time to first terminal prompt: 832 → 230 ms cold, 785 → 157 ms warm

- Typing latency p95: 47.4 → 31.2 ms

To be fair, muxflow was thin to begin with, so the raw numbers are a few tens of megabytes/ms.

This migration would be a strong no-go without LLMs. Pre-LLM the cost would be huge! Writing the whole UI in Rust vs the familiar React? But with LLMs, the cost goes away to just some tokens. And with that I get:

  1. Much better performance
  2. A codebase that is 100% Rust (beyond mobile)
  3. No finicky Tauri rendering differences between Mac and Linux

The ugly parts:

- The GPUI third-party crate ecosystem is very niche compared to React. With Tauri I used CodeMirror. With GPUI I couldn't use the Zed crates since they're GPL and muxflow is MIT, so I wrote my own lightweight markdown WYSIWYG and code editor.

- Build times. It's hard to run many agents in parallel, as parallel builds and tests put heavy I/O pressure on the machine. I haven't tried optimizing it yet.

Write-up with more detail: https://galvered.com/blog/muxflow-gpui-migration/

Curious whether others hit the same crate gap, and what you used for text editing in GPUI.

* an app I'm building for personal use open source, MIT, runs coding agents in tmux across remote machines


r/rust • • 1d ago

List of ~200 companies hiring (or that have hired) Rust engineers

72 Upvotes

Hey, I'm Georgios from getarustjob.com. I run a Rust job board, and after listing a few hundred Rust roles I put together a clean list of the companies behind them.

If you're job hunting, switching into Rust, or just curious who's investing in it, this should save you some digging. Recruiters / staffing agencies are removed so it's only actual companies.

At a glance

  • Cloud / infra / developer tools: 52 companies (27%)
  • AI / ML / data / quantum: 33 companies (17%)
  • Crypto / web3 / trading: 30 companies (16%)
  • Defense / aerospace / robotics: 26 companies (13%)
  • Consumer / media / e-commerce / other: 20 companies (10%)
  • Security / identity / privacy: 17 companies (9%)
  • Finance / banking / payments: 9 companies (5%)
  • Automotive / industrial / hardware: 6 companies (3%)
  • Cloud + AI + crypto = 60% of companies
  • Most listings by company: Kraken (12), Anduril (9), then Radar Labs / Zscaler (4), then several at 3 (Supabase, IonQ, ParadeDB, QuEra, Anthropic, Polars, xAI, Alignerr, Fab2, Massive, Revel, Palantir, Citi, Dassault…)
IndustryCompaniesShare
Cloud / infra / developer tools5227%
AI / ML / data / quantum3317%
Crypto / web3 / trading3016%
Defense / aerospace / robotics2613%
Consumer / media / e-commerce / other2010%
Security / identity / privacy179%
Finance / banking / payments95%
Automotive / industrial / hardware63%

Industries below are ordered by company count; inside each group, companies are ordered by total Rust roles I've listed.


Cloud / infra / developer tools (52 companies · 27%)

  • Radar Labs (4 listings)
  • Supabase (3 listings)
  • Fab2 (3 listings)
  • Massive (3 listings)
  • Revel (3 listings)
  • Intelic (2 listings)
  • Loci (2 listings)
  • MetalBear (2 listings)
  • Microsoft (2 listings)
  • Qumulo (2 listings)
  • Siemens (2 listings)
  • Realm (2 listings)
  • Amazon Web Services (1 listing)
  • CircuitHub (1 listing)
  • Cloudflare (1 listing)
  • Deepslate (1 listing)
  • GitLab (1 listing)
  • Grid Dynamics (1 listing)
  • Huawei Research Center Germany (1 listing)
  • JUXT (1 listing)
  • Kake (1 listing)
  • Kaseya (1 listing)
  • Mainmatter (1 listing)
  • Materna (1 listing)
  • Minimal (1 listing)
  • MIRA (1 listing)
  • Mozilla (1 listing)
  • Neo (1 listing)
  • NordicWorkflow (1 listing)
  • Prima (1 listing)
  • Prospecta (1 listing)
  • Quicknode (1 listing)
  • Restate (1 listing)
  • Sentry (1 listing)
  • Serokell (1 listing)
  • STEINER-HITECH (1 listing)
  • Technology Innovation Institute (1 listing)
  • Tempo (1 listing)
  • Twin Labs (1 listing)
  • UMATR (1 listing)
  • Voluntas (1 listing)
  • Workato (1 listing)
  • Zed (1 listing)
  • Ditto (1 listing)
  • Enhance (1 listing)
  • Everforth Apex (1 listing)
  • Full Spectrum (1 listing)
  • MongoDB (1 listing)
  • N-able (1 listing)
  • Poppi Technologies (1 listing)
  • Termius (1 listing)
  • Wasmer (1 listing)

AI / ML / data / quantum (33 companies · 17%)

  • IonQ (3 listings)
  • ParadeDB (3 listings)
  • QuEra Computing (3 listings)
  • webAI (3 listings)
  • Anthropic (3 listings)
  • Polars (3 listings)
  • xAI (3 listings)
  • Alignerr (3 listings)
  • Google (2 listings)
  • Oxford Ionics (2 listings)
  • Tensordyne (2 listings)
  • Aftershoot (1 listing)
  • Cognite (1 listing)
  • CommonAI (1 listing)
  • Datamint (1 listing)
  • Estuary (1 listing)
  • Fivetran (1 listing)
  • Harmattan AI (1 listing)
  • Modal (1 listing)
  • Nebius (1 listing)
  • NVIDIA (1 listing)
  • PsiQuantum (1 listing)
  • Quantum - QTR (1 listing)
  • Runpod (1 listing)
  • SolveAI (1 listing)
  • Veo Technologies (1 listing)
  • Vermillion Analytics (1 listing)
  • VuNet Systems (1 listing)
  • LiteLLM (1 listing)
  • Machinify (1 listing)
  • Neurelo (1 listing)
  • Satalia (1 listing)
  • yeet (1 listing)

Crypto / web3 / trading (30 companies · 16%)

  • Kraken (12 listings)
  • Keyrock (3 listings)
  • Braiins (2 listings)
  • Helius (2 listings)
  • Binance (1 listing)
  • Blockrotate (1 listing)
  • BlockTech (1 listing)
  • Chainlink Labs (1 listing)
  • DEX Labs (1 listing)
  • Dune (1 listing)
  • Easygo (1 listing)
  • Flowdesk (1 listing)
  • Mysten Labs (1 listing)
  • No Limit Nodes (1 listing)
  • OneChronos (1 listing)
  • Payward (1 listing)
  • Polygon.io (1 listing)
  • Stake Engine (1 listing)
  • Upstox (1 listing)
  • Verse (1 listing)
  • CoW DAO (1 listing)
  • MoonPay (1 listing)
  • NinjaTrader (1 listing)
  • Ondo Finance (1 listing)
  • Partisia Blockchain Applications (1 listing)
  • Phantasma Labs (1 listing)
  • Prex (1 listing)
  • Rain (1 listing)
  • Sentz (1 listing)
  • Uniswap Labs (1 listing)

Defense / aerospace / robotics (26 companies · 13%)

  • Anduril (9 listings)
  • Palantir (3 listings)
  • Neros Technologies (2 listings)
  • Helsing (2 listings)
  • Axon (1 listing)
  • CHAOS Industries (1 listing)
  • General Dynamics Mission Systems (1 listing)
  • Humble Robotics (1 listing)
  • Intramotev (1 listing)
  • Mind Robotics (1 listing)
  • Oceaneering (1 listing)
  • OSARO (1 listing)
  • Parry Labs (1 listing)
  • Quantum-Systems (1 listing)
  • SpaceXSI (1 listing)
  • Stoke Space (1 listing)
  • Thales (1 listing)
  • Thales Norway (1 listing)
  • Trusted Space (1 listing)
  • Umbra (1 listing)
  • Air Space Intelligence (1 listing)
  • BWI GmbH (1 listing)
  • Cambridge Aerospace (1 listing)
  • Defense Unicorns (1 listing)
  • General Dynamics UK (1 listing)
  • Watney Robotics (1 listing)

Consumer / media / e-commerce / other (20 companies · 10%)

  • Matic (2 listings)
  • 1501 (1 listing)
  • ArtCraft (1 listing)
  • Cardog (1 listing)
  • Discord (1 listing)
  • DoorDash (1 listing)
  • Komodo Health (1 listing)
  • Magnite (1 listing)
  • Paradromics (1 listing)
  • Postscript (1 listing)
  • QTPILOT (1 listing)
  • Veepee (1 listing)
  • Walmart Global Tech India (1 listing)
  • Anza (1 listing)
  • Arionkoder (1 listing)
  • Carv (1 listing)
  • Cube Group (1 listing)
  • Darley Technologies (1 listing)
  • Layup (1 listing)
  • Tubi (1 listing)

Security / identity / privacy (17 companies · 9%)

  • Zscaler (4 listings)
  • OPSWAT (2 listings)
  • Proton (2 listings)
  • 1Password (2 listings)
  • Cyberus Technology (1 listing)
  • Cylake (1 listing)
  • Scanner (1 listing)
  • ThreatMark (1 listing)
  • Threema (1 listing)
  • Vietnam National Cyber Security Technology (1 listing)
  • Aembit (1 listing)
  • Arkion Identity Systems (1 listing)
  • Dragos (1 listing)
  • Fortanix (1 listing)
  • IDEMIA (1 listing)
  • Lastwall (1 listing)
  • National Digital Trust Company (1 listing)

Finance / banking / payments (9 companies · 5%)

  • Citi (3 listings)
  • Abacus Group (1 listing)
  • Avaloq (1 listing)
  • BlackRock (1 listing)
  • Fidelity Investments (1 listing)
  • Longbridge (1 listing)
  • NCR Atleos (1 listing)
  • Nasdaq (1 listing)
  • Scalable Capital (1 listing)

Automotive / industrial / hardware (6 companies · 3%)

  • Dassault Systèmes (3 listings)
  • Rivian and Volkswagen Group Technologies (2 listings)
  • arculus (1 listing)
  • Flyscan Systems (1 listing)
  • Gentherm (1 listing)
  • Frequenz (1 listing)

~193 companies · 269 listings.

Same list with country / remote filters and who's hiring right now: getarustjob.com/companies-using-rust

If something looks wrong or a company shouldn't be here, tell me and I'll fix it.


r/rust • • 1d ago

🧠 educational I'm making a step-by-step series building a wallet & payments REST API in Rust. Would love feedback from learners

Thumbnail youtu.be
0 Upvotes

Hi everyone! I'm making a YouTube series where I build a wallet and payments REST API in Rust, one small step at a time. It's aimed at people who know basic Rust and want to see how it's used to build a real backend.

It starts with a single Axum route. So far it covers CRUD with shared state, error handling with thiserror, type-safe validation, PostgreSQL with SQLx, and the repository pattern with traits. Next up are integration tests, accounts, money transfers, race conditions, auth and idempotency.

Transparency note: I cloned of my own voice because English isn't my first language.

If you're learning Rust, I'd really appreciate your feedback:

- Is the pace OK, or did you get lost anywhere?

- Which concept felt unclear or rushed?

- Is the code readable on screen?

- What would you like to see in future episodes?

Thanks for taking a look!


r/rust • • 1d ago

Suggestions for Rust Course

9 Upvotes

I am currently learning Rust programming language and want to enroll into a course for better guidance and projects . Someone help me choose the best available course on Udemy.


r/rust • • 1d ago

🙋 seeking help & advice Should I add support for Rust?

20 Upvotes

Hi, I am the developer of Leadwerks Game Engine. I'm looking for a mid-difficulty language, somewhere in between C++ and Lua. C# would work nicely, but the lag spikes caused by the garbage collection seem like it ruins the language for realtime 3D games, especially for VR. I'm not that familiar with Rust but I hear a lot of good things about it, and it appears to use shared pointers, which eliminates the performance problems full garbage collection would introduce.

Support for Rust can be added by piping all the commands through a C interface and writing some structure/class code on the Rust side that wraps everything up nicely for the end user.

I'm aware of the open-source Bevy 3D engine, but it's lacking a visual editor. Leadwerks 5 has a very capable level editor / visual designer that's been refined over years with lots of user feedback. To be clear, Leadwerks is closed-source commercial software (with a low price point and no royalties).

Do you think Rust would be a good match for what we are looking for in a language? Would adding support for the Rust programming language would be of interest to developers here? Please let me know your thoughts and if you have any questions.


r/rust • • 1d ago

Why does tokio mirror certain parts of the futures crate?

29 Upvotes

Take the AsyncRead trait for example. Both tokio and futures is based around the poll_read method but they take a different buffer type and return a different error type. Why? Was the futures version unsuitable?


r/rust • • 1d ago

🎙️ discussion I unfortunately can't enjoy rust

0 Upvotes

I wanted to learn rust because I wanted to make games but in a hard programming language instead of letting C# do everything for me.

I obviously loved rust after learning it a bit but then I decided to try and get a graphics library

I'm familiar with raylib and basically never use anything else so i decided to get it, but it required the msvc toolchain.

Unfortunately for me, I can't install the msvc toolchain due to storage reasons, so I had gotten the gcc toolchain instead which worked just fine

But then I found another game library which I thought would work but it failed at linking bcs of some obscure missing library.

I'll be trying to find some other user friendly libraries Tommorow but if I don't, then the whole point of rust for me would be over.


r/rust • • 1d ago

How convert precossesor tera to askama ?

0 Upvotes

Hello , i'm dev of runique a framework web in rust , and now , i'm in a time of consolidate a source code.

For a futur , i would like gave a choice of engine template.

Now, runique use tera, i have add a few preproceror for limited a boilerplat , and after a little research, i learn it’s complicated.

So i came to you for advice , have you a recommandation ?

Sorry for my english, i'm french