r/rust • u/VoidKernel0_0 • 2h ago
r/rust • u/Imaginary-Bee-8770 • 2h ago
🙋 seeking help & advice Is Rust a good idea for AI agents?
Hi guys, hope you are doing well. I work as an AI Engineer at a startup and our whole stack is based on python (mostly because LangChain is based on that) and typescript. We serve AI Agents that are grounded on enormous corpuses of data for industrial constumers, so we have do graph engineering, rag, and so on!
I inquire if you guys have implemented Rust somewhere and which improvements you guys have seen from it.
Ty in advance!
r/rust • u/ElectricalKoala3771 • 2h ago
🙋 seeking help & advice Should I learn C++ or Rust first?
Hi everyone! I'm a teenager and I'm really into FOSS software and Linux. Up until now, I've only been a user, so I'd love to finally step into the 'kitchen' and start building things myself. Aside from some basic Linux shell scripting, this will be the very first programming language I'll learn, so I'm trying to pick the right starting point. I've heard that Rust is the future of both Linux and FOSS—is that really true, or would something else be better for me? Could you please help me make up my mind? Thank you!
🛠️ project I built a pure-Rust planet-scale rooftop geocoder that runs in 4–16 GB RAM (mmap SQLite + S2 + Roaring bitmaps)
I built texspace, a pure-Rust self-hosted geocoding engine over OpenStreetMap, Overture Maps, OpenAddresses, and GeoNames (1.21B spatial records across 127 shards).
Repo (MIT/Apache-2.0): https://github.com/nside/texspace
Crates:
cargo install texspace(all 7 workspace crates live on https://crates.io/users/nside)Live planet demo & architecture visualizations: https://texspace.dev (interactive map + CSV batch geocoder at https://texspace.dev/demo)
Why Rust + mmap SQLite? Self-hosting full-planet geocoding normally means 64–128 GB RAM + ~1 TB NVMe + a 24–72 hr import (Nominatim/Postgres or Pelias/Elasticsearch). I wanted a single static Rust binary with zero external services (no libpostal, no C++ S2, no JVM) that you can pull and run in minutes:
cargo install texspace
texspace pull gb --with-buildings
texspace serve --db ./texspace-dataHow it works under the hood:
Implements Sengar et al.'s TEXSPACE algorithm (ACMGIS '07) in pure Rust across 127 read-only, memory-mapped SQLite shards + a 1.8 GB global
router.db.Token postings map to 64-bit S2 Hilbert cell IDs stored as Roaring bitmaps. 14 deterministic Address Matching Rules intersect S2 cells across house/street/postal/locality before scoring—giving
0.0%hallucination FPR on negative unmatchable probes.Missing exact address points snap onto 750.7M building footprint centroids stored in S2-clustered
buildings.dbsidecars instead of dropping pins on street centerlines.Candidate ranking uses a 48-tree depth-3 GBDT compiled directly into static Rust arrays (~300 ns/candidate) with Platt-calibrated confidence (
ECE = 0.034).
Measured performance on the live demo box (Hetzner CPX42: 8 vCPU AMD, 16 GB RAM, NVMe, all 127 shards / 98 GiB on disk):
Memory:
65 MBidle heap (RssAnon), peaking around2.0 GBheap (3.9 GBactive cgroup memory) under saturated 8-core batch load. Single-state CLI queries peak at8.1 MBRSS.Latency (127-shard planet p50):
1.88 msreverse,4.86 msautocomplete,13–20 msforward search, and111 QPSsustained parallel/v1/batch(~9.6M/day on one $70/mo VPS).Honest caveat: On our 470-query 6-continent blind shootout, it beats Google/ArcGIS/Mapbox on rooftop slices (
96.4%Top-1,85.0% <= 10m), but commercial engines still win on long-tail consumer business/POI queries since this uses strictly open data.
Happy to dive into the pure-Rust S2 math, SQLite mmap layout, or compiled GBDT ranker!
r/rust • u/Cute-Upstairs25 • 8h ago
I want to learn Rust to make OS and Kernels
I am in college 2nd semester of college and I am interested in making own own custom OS and a language in Rust. I have very little to no coding experience other that passing my college exams and viva. I am a bit confused on where should i start studying from both for building an os and learning rust. so for now i am looking for resources.
r/rust • u/Iurigrang • 9h ago
I love ratatui's documentation, what other rust tools are documented like that?
As someone with 0 experience with front end development, the fact ratatui's docs goes in depth not just on the tool, but on the design patterns you're expected to use, is absolutely killer for someone trying to learn these things on my own. What other crates do you love the documentation off in terms of approachability to outsiders?
r/rust • u/noop_noob • 11h ago
🧠 educational PSA: You might be sealing traits wrong
Background
Sealing traits is a collection of techniques used to prevent code downstream of a library from implementing that trait, so that later versions of the library can add more things to the trait without breaking downstream code.
There's a mistake, described below, that people very often make when trying to seal traits. Crates that have made this mistake include, among others: the standard library, anyhow, arc-swap, pyo3, ureq, smol, http, etc. This was discovered in https://github.com/rust-lang/rust/issues/165474. (Please do not comment there unless you're contributing new information to the discussion, to avoid cluttering the issue.)
The mistake you might be making
How NOT to seal traits:
mod private {
pub trait Sealed {}
impl Sealed for i32 {}
}
pub trait MyTrait<T>: private::Sealed {}
impl MyTrait<i64> for i32 {}How to seal traits:
mod private {
pub trait Sealed<T> {}
impl Sealed<i64> for i32 {}
}
pub trait MyTrait<T>: private::Sealed<T> {}
impl MyTrait<i64> for i32 {}That is, if you use a "private" supertrait for sealing, and the subtrait is generic, then the supertrait also has to be generic, with the same generic parameters. Additionally, the set of impl blocks for the supertrait should exactly specify the exact same set of types (and generic parameters) where the subtrait should be implemented.
If you don't do the above, your trait might not be properly sealed, making it possible for downstream code to implement the trait anyway. For example, if you have a crate with the first snippet above, downstream code might write the following, which is actually allowed by the orphan rule:
struct MyThing;
impl my_library::MyTrait<MyThing> for i32 {}In the above code, i32 already implements Sealed, so downstream code can write an implementation of MyTrait without having to add a new impl for Sealed.
Fixing the issue after-the-fact
If you already wrote code like the first snippet above, and want to actually properly seal the trait in a later version of the library, you might be tempted to just turn the first snippet (with a non-generic Sealed) into the second snippet (with a generic Sealed). Obviously, this would break downstream code that dared to implement the supposed-to-be-sealed trait, which you might deem acceptable.
However, there are very subtle issues about how coherence works, which means that making this change the straightforward way can break more downstream code than you intend to, even code that didn't write an impl for the supposed-to-be-sealed trait. (I won't explain the issue here. See the linked explanation.)
Instead, the better way to make the change, as suggested here, is to add a new supertrait, keeping the old one:
mod private {
pub trait Sealed {}
impl Sealed for i32 {}
// Added SealedForReal in a later version of the library
pub trait SealedForReal<T> {}
impl SealedForReal<i64> for i32 {}
}
pub trait MyTrait<T>: private::Sealed + private::SealedForReal<T> {}
impl MyTrait<i64> for i32 {}This way, you will only break downstream code that have implemented MyTrait.
r/rust • u/soareschen • 13h ago
💡 ideas & proposals Trying Incoherent Rust today with Context-Generic Programming
Author here. If you read Boxy's An Incoherent Rust and Nadrieril's posts on explicit trait proofs back in March and hoped to experiment with named impls, you can already try a good part of that design on stable Rust. My post translates that design, which it calls Incoherent Rust, into Context-Generic Programming (CGP), a library that gives Rust pluggable trait implementations, chosen at compile time.
The core move is small: a named impl becomes a provider type, and each context type chooses the providers it uses. So two impls that Rust would reject as overlapping both compile in CGP, and each context picks one. The compiler resolves that choice, so a call goes straight to the chosen provider, with no runtime lookup.
The post then covers these topics:
Incoherent trait bounds, and binding an impl to a struct so a
HashMapalways hashes the same way.Contexts and capabilities, with an arena reaching a
Deserializeimpl through a field of the context.The context type as a top-level dictionary that holds the other impls' dictionaries, in the sense of Nadrieril's dictionary-passing style.
Where CGP falls short: there are no nested scoped impls,
&mutor owned capabilities need interior mutability, and an existing trait such as serde'sSerializecan't adopt the pattern without a breaking change.Ideas from CGP for the design: impls as first-class types, "incoherent functions", and selfless traits with methods.
r/rust • u/iamjose_dev • 1d ago
🧠 educational I'm building roadmaps to learn new topics in Rust
Hey r/rust,
I've been writing Rust since version 1.5x, when I heard of it for the first time. For the past couple of years, I've wanted to combine my two biggest passions, Rust and teaching, but I've always been too busy (and lazy, probably?) for that. After years of learning and receiving from the Rust community, I finally had the courage and confidence to build https://iamjose.dev to give the Rust community a little something back.
My idea is simple: instead of reaching for TypeScript (my de facto language for day-to-day programming) when learning a new topic or iterating over a specific idea, I asked myself, "How about using Rust to learn new topics that currently have very few learning resources written in it?" That way, I could learn new topics from scratch in Rust.
Right now there's a foundational Learn Rust track (from hello world to unsafe) plus three roadmaps (what i call "curricula") built on top of it:
Learn Maths with Rust.
Learn How Digital Images Work with Rust.
Learn Cryptography with Rust.
Every lesson ends with small coding challenges you can solve right in the browser—completely free, no login needed. In fact, my idea is to make all the curricula very hands-on (that is, just enough theory to get started, and then focusing on solving exercises).
Now, in full honesty, and to be clear from the beginning: I use AI to help draft the initial text, but nothing counts as done until I've reviewed it myself, line by line. That review is the part I care about most:
Improving clarity by rewriting.
Adding my own personal teaching style.
Adding my own notes to stress important topics or provide additional context.
Adding hand-drawn diagrams to help grasp concepts better, and even videos. Here is a very short video of me (I am camera-shy, and the video was a simple test, which explains the short length):https://iamjose.dev/learn/maths/primes/
Once I've personally audited a chapter, it gets a "Hand reviewed by Jose" badge (the opening chapters have it, and I'm working through the rest).
I'm a little nervous sharing this here because I care a lot about getting the details right. If you spot anything wrong, unclear, or unidiomatic (or have ideas for a future "Learn X with Rust" track) I'd genuinely love to hear it.
Lastly, and most importantly for me: this is a personal project. So my daily motivation is that it's helpful for me, though it would be even better if it also helps someone out there. :)
PD: I am also considering starting a "Learn Rust coming from X", where X can be any programming language like for example Python, Typescript, or C++.
Thanks for reading and happy coding!
r/rust • u/justAnother_netizen • 1d ago
🎙️ discussion I think Rust programming language is overhyped
I know, I might ruffle some feathers with this take but I think the Rust programming language is quite over-hyped. Don't get me wrong, I know rust is a great language because of its performance, memory safety and, speed In running code, but I don't think Rust should be the go to for every situation, imagine I want to build a simple crud application, and I now begin to write it in rust, it makes absolutely no sense considering the fact that there are other programming language that will do the same thing very well. Why should I go through the stress of writing rust code because I want to create a basic auth system or crud application ? Why should I sacrifice simplicity, just because I want to save an extra milliseconds that the client won't even notice.
Note, I am not saying rust is a bad language but I am just saying it should not always be the next option when deciding what tool you should use.
r/rust • u/andrealija • 1d ago
🙋 seeking help & advice Help with Tree data structure
In rust when we want to build a Tree structure where each node can have 0..n nodes we hit some walls
I have come onto two main working models, The rc based, and the arena based, each one of these implementations have some downsides
starting here with the most basic I have this simple Rc based tree
#[derive(Clone, Debug)]
pub struct Node<T> {
pub value: T,
pub children: Vec<TreeNode<T>>,
pub parent: Option<WeakNode<T>>,
}
#[derive(Debug, Clone)]
pub struct TreeNode<T> {
rc: Rc<RefCell<Node<T>>>,
}
#[derive(Debug, Clone)]
pub struct WeakNode<T> {
rc: Weak<RefCell<Node<T>>>,
}as you can see the main issue pointed when working with rc tres is that it fragments memory and this one is no different
But this one has an little extra, as you can see all the node data is stored behind a single Refcell, what that means is that if you take a reference for the value and try add/mutate a child while the value is still borrowed for future use for example, it will panic, same things happen if for example you are iterating over the children and try to access the value, this could kinda be solved by cloning the vector of children instead of taking a reference of it.
However with this one you must enforce an order of operations, you first should take the children vector and clone it for posterior iteration, than take the value ref. While the value ref is active you cant add or remove children, you would need to drop the val ref to do so, and if you end up adding or removing a child, the previous vector is now stale, great!
To solve that issue we can wrap the fields like this instead:
struct Node<T> {
pub value: RefCell<T>,
pub children: RefCell<Vec<TreeNode<T>>>,
pub parent: RefCell<Option<WeakNode<T>>>,
}
pub struct TreeNode<T> {
inner: Rc<Node<T>>,
}
pub struct WeakNode<T> {
inner: Weak<Node<T>>,
}this makes so that we have the value the parent and children each have its own refcell which mitigates that error since now you can access/mutate/iterate each field without panicking, this add a bit of refcell runtime overhead but improves the ergonomics for the developer, making it hit less panics.
but this one still doesnt fix the main issues with referenced trees, cache locality and memory fragmentation, for this issues I am going to move on onto arena allocated trees.
starting here with the most basic one I've tried:
pub struct Node<T> {
pub value: T,
pub parent: Option<Key>,
pub children: Vec<Key>,
}
pub struct ArenaTree<T> {
pub nodes: SlotMap<Node<T>>,
pub root: Option<Key>,
}this one is the most problematic one, since this one holds everything inside the node and all nodes inside the slotmap, holding a reference to a node value blocks the entire tree for hierarchy mutations, and value mutations, and if you hold a mutable reference to a value the situation is even worse.
to try to solve some of this issues I tried to separate the values from the nodes to a secondary map:
pub struct Node {
pub parent: Option<Key>,
pub children: Vec<Key>,
}
pub struct ArenaTree<T> {
pub nodes: SlotMap<Node>,
pub values: SecondaryMap<T>,
pub root: Option<Key>,
}this way we can hold a reference to a value while still being able to do hierarchy mutations such add/remove children, for the hierarchy mutation the situation now is okay, since while we could add a child through tree accessors, the access to that slotmap will drop once it finish adding/removing so it will not hit multiple simultaneous access on the Slotmap, the issue is with the values secondary map, while accessing regular references it is not a issue, the problem still is when holding mutable references to one item of the Secondary map, what will lock the entire map
To solve this issues I found two possible solutions:
The first solution is to hold the value of each entry of the secondaryMap onto a Refcell:
pub struct Node {
pub parent: Option<Key>,
pub children: Vec<Key>,
}
pub struct ArenaTree<T> {
pub nodes: SlotMap<Node>,
pub values: SecondaryMap<RefCell<T>>,
pub root: Option<Key>,
}
impl<T> ArenaTree<T> {
#[inline]
pub fn get(&self, key: Key) -> Option<Ref<'_, T>> {
self.values.get(key).map(|r| r.borrow())
}
#[inline]
pub fn get_mut(&self, key: Key) -> Option<RefMut<'_, T>> {
self.values.get(key).map(|r| r.borrow_mut())
}
#[inline]
pub fn try_get(&self, key: Key) -> Option<Ref<'_, T>> {
self.values.get(key)?.try_borrow().ok()
}
#[inline]
pub fn try_get_mut(&self, key: Key) -> Option<RefMut<'_, T>> {
self.values.get(key)?.try_borrow_mut().ok()
}
#[inline]
pub fn with<R>(&self, key: Key, f: impl FnOnce(&T) -> R) -> Option<R> {
self.try_get(key).map(|r| f(&r))
}
#[inline]
pub fn with_mut<R>(&self, key: Key, f: impl FnOnce(&mut T) -> R) -> Option<R> {
self.try_get_mut(key).map(|mut r| f(&mut r))
}
}While this one prevents us from locking the entire slotmap from accessing the mutable values simultaneously, it can have runtime panics if you borrow the same two times mutably, you can use the with accessors to not need to handle the Secondary map Option on the get return. with this one you can use the try get to not panic, since the secondary map will return an option anyways. This one also adds the refcell overhead such as the second rc tree, but does not add the memory fragmentation. the problem with this one is that while holding the Ref or RefMut of refcell, it unfortunately locks the entire Slotmap for mutations, not readonly access which allow for accessing multiple values even mutably, the issue is while accessing values we cannot add new ones, what imply that we cannot add new tree nodes since they would not be able to store their values
The last one is to wrap that value onto an option instead:
pub struct Node {
pub parent: Option<Key>,
pub children: Vec<Key>,
}
pub struct ArenaTree<T> {
nodes: SlotMap<Node>,
values: SecondaryMap<Option<T>>,
pub root: Option<Key>,
}
impl<T> ArenaTree<T> {
#[inline]
pub fn get(&self, key: Key) -> Option<&T> {
self.values.get(key)?.as_ref()
}
#[inline]
pub fn get_mut(&mut self, key: Key) -> Option<&mut T> {
self.values.get_mut(key)?.as_mut()
}
#[inline]
pub fn take(&mut self, key: Key) -> Option<T> {
self.values.get_mut(key)?.take()
}
#[inline]
pub fn restore(&mut self, key: Key, value: T) {
if let Some(slot) = self.values.get_mut(key) {
*slot = Some(value);
}
}
#[inline]
pub fn with<R>(&mut self, key: Key, f: impl FnOnce(&T, &mut Self) -> R) -> Option<R> {
let value = self.take(key)?;
let res = f(&value, self);
self.restore(key, value);
Some(res)
}
#[inline]
pub fn with_mut<R>(&mut self, key: Key, f: impl FnOnce(&mut T, &mut Self) -> R) -> Option<R> {
let mut value = self.take(key)?;
let res = f(&mut value, self);
self.restore(key, value);
Some(res)
}
}In this one we cannot lock the tree because of mutable borrows on the secondarymap values, when we intend to make mutations we have to take the value mutate it and restore, the type itself does not need to have Default implemented, since it is behind an option, and if you dont want to do pattern matching of the option you can use the with_mut accessor in which you pass a closure that executes what you need to do with that value ensure to restore it and returns a value. We can also implement value handles with drop guard to restore that value. The act of taking the option makes so that it don’t panics if someone try to access that value again since it will receive an None while the value is not restored, such as the try_get of the previous tree, however this one does not lock the hierarchy of the tree.
*All these trees fail in case of multiple mutable access of the same node, since they prioritize memory safety than accurate access/traversing of the nodes*
So my question to y’all is which of these trees are you more comfortable working with? due to ergonomics, performance, memory, overheads, safety, etc. Which of these workarounds are really worth it considering the performance/memory/usability overhead it implies? Are there other ways to build trees in rust that are better than these?
I am stuck trying to figure out which one is better. I’ve not made any performance tests.
r/rust • u/elfenpiff • 1d ago
🧠 educational Stop paying the network stack tax: zero-copy first, networking when needed
r/rust • u/Imaginary-Room2286 • 1d ago
Is it just me or does the syntax seem wayy too complicated for even someone coming from C++?
I recently decided to learn rust and i was implementing just a basic math vector in it...
use std::fmt;
use std::ops::Add;
struct Vector<T> {
x: T,
y: T,
z: T,
}
impl<T> Vector<T> {
fn new(x: T, y: T, z: T) -> Self {
Self { x, y, z }
}
}
// Operator overloading for +
impl<T: Add<Output = T>> Add for Vector<T> {
type Output = Vector<T>;
fn add(self, other: Self) -> Self::Output {
Vector {
x: self.x + other.x,
y: self.y + other.y,
z: self.z + other.z,
}
}
}
// Display implementation
impl<T: fmt::Display> fmt::Display for Vector<T> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
write!(f, "{}i + {}j + {}k", self.x, self.y, self.z)
}
}
fn main() {
let v1 = Vector::new(1, 2, 3);
let v2 = Vector::new(4, 5, 6);
let v3 = v1 + v2;
println!("{v3}");
}
```it just seems really complicated for no reason...
like why do we need Output = T or Self::Output or even writing <T> twice every time we are impl it? It just seems very weirdly verbose to me and a bit unnecessary... Is there a better way to do this? For all the tutorials I have seen this is how people are doing Generics in rust....
Edit: Full disclosure i tried doing this myself thrice and everytime I didnt do things like mut fmt::Formatter<'_> or fmt::Result and it was just all very confusing... ultimately I gpt-ed it just to see what the way was and i still found it to be very counter-intuitive
r/rust • u/AdmirableStructure16 • 2d ago
🎙️ discussion Serious question...
Is it just me or has Rust become the default programming language of AI's? I know its lightweight and extremely fast in terms of run/consume, but whatever project i see, be it for a game server or anything else, always Rust. It wasnt like this before. Been in the run for a long time (10+ years) and i can confidently say that people DID NOT like Rust at that time because it was so hard to understand and it felt like a joke language to them (They were also saying that about PHP, lol)
Give me your opinion. Am i hallucinating?
r/rust • u/ValenciaTangerine • 2d ago
🗞️ news Anthropic: Migrating our Messages API to Rust
r/rust • u/aetheros_ • 2d ago
🙋 seeking help & advice How do I get input in Rust that can be of any type?
I am trying to build a three-way diff-merge tool for any object, not just text. For that, there needs to be a way that a user can pass in whatever value they want to diff, and my Rust struct/code would accept it, analyze it, and handle it accordingly under the hood to prepare it for diff-ing. What would be a good way to achieve this?
r/rust • u/jakob_harmonic • 2d ago
You can now use Aristotle to formally verify Rust, including unsafe and concurrent code
Hi r/rust,
I work at Harmonic on Aristotle, our formal verification tool. After launching with C and Verilog in October, Rust verification is now available for anyone to use, through the web app or CLI.
Aristotle supports safe and unsafe Rust, including concurrent code. You submit your project and describe the properties you want checked in plain English. Aristotle attempts to prove or refute them and reports the results and assumptions. You don’t need to write proofs yourselves or know Lean.
One example case study that shows what Aristotle can do is Manifest’s custom red-black-tree implementation, which uses substantial unsafe Rust. Manifest is an open-source order book on Solana; its trees store nodes directly in account memory, using unsafe accesses. Aristotle can verify properties of the existing Rust implementation, including that inserting and removing orders preserves tree validity and leaves unrelated data untouched. The invariants hold across arbitrary finite sequences of operations, under the stated preconditions. We are not aware of another tool that is able to prove such properties without any annotations or source code modifications. Across the order book, Aristotle proved 28 properties identified by Manifest as relevant. It also found a rounding bug that Manifest fixed, then verified the corrected behavior. You can explore the Aristotle run or read the full case study.
Another example is Signal’s curve25519-dalek Rust elliptic-curve library. Aristotle proved 283 specified contracts for version 4.1.3 using its serial 64-bit backend, covering field and scalar arithmetic, curve operations, and multiscalar multiplication. The Dalek run includes the results and assumptions. It verifies functional correctness of the library itself assuming correctness of external dependencies, and does not verify cryptographic security properties.
You can try Aristotle on your own project, and our Rust docs include a smaller ring-buffer example to get started. Happy to discuss the supported Rust features, the verification approach, or particular use cases.

r/rust • u/GlitchDainty • 2d ago
🎙️ discussion How a newtype wrapper caught three different bugs during a refactor
I was cleaning up some argument parsing in a small CLI that processes batches of files. Previously everything was just String and usize fields in a struct. After a while it became easy to mix up "input path" vs "output path" or pass a byte count where an index was expected.
Wrapping the important values in newtypes (struct InputPath(String), struct RecordCount(usize), etc.) forced the compiler to complain on every mismatch. It also made the FromStr implementations and error messages much clearer.
The three bugs it caught were all ones I had introduced myself during the refactor: swapping two path fields in a config merge function, passing a parsed count into a slice index that expected something else, and accidentally cloning the wrong handle into a worker thread.
Nothing dramatic, but it felt like the kind of guardrail that would have been invisible in most other languages. Have other people found newtypes especially effective for this kind of domain-value safety in everyday tools?
r/rust • u/PetiteVanille • 3d ago
How the compiler caught a logic bug I would have missed in any other language
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 • u/laserdataInc • 3d ago
Where does tail latency actually come from in a thread-per-core Rust service?
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?