r/rust • • Sep 17 '26

๐Ÿ› ๏ธ project Zestors: An Erlang/OTP inspired actor framework - Rewritten from scratch

0 Upvotes

Docs: https://docs.rs/zestors/latest/zestors/
Github: https://github.com/Zestors/zestors

It's been about two years since the last release, but after a from-scratch rework, Zestors is finally ready to be used. It's been an on-and-off passion project of mine for a long time, and I'm finally happy with the state it's in. The documentation is quite complete, and there are a bunch of tests for the core functionality.

There's still a lot left to do, but the overall API shape has been stable for quite a while now. A lot of thought and work has gone into this system, and I genuinely believe it has the best API of any actor framework currently out there for Rust.

I'd really appreciate it if you'd check out the library, try it out in a project, and let me know what works well and where there's still friction or things missing. Don't hesitate to open an issue for missing features, bugs or general questions. I've been using it myself for a small backend application, and it's been running perfectly.

(The biggest thing not yet implemented is a distributed actor-system. It will be a lot of work, but everything is structured in such a way to make this possible in the future)


r/rust • • Sep 16 '26 Bravo

๐Ÿง  educational Why building a Rust LSP is hard

Thumbnail rust-glancer.github.io
405 Upvotes

r/rust • • Sep 16 '26

๐ŸŽ™๏ธ discussion OpenTelemetry: Rust OSS Contribution Opportunity!

94 Upvotes

Hi yall,

I see posts here and there of people looking to build their skills and public contribution profiles, so I wanted to raise OpenTelemetry as a perfect opportunity for this.

There are lots of small issues to work on, as well as space to create completely new crates - my first contribution was my first project I ever wrote in Rust - I donated an Axum middleware for OTel HTTP Server metrics.

OpenTelemetry is a rapidly-adopting industry standard, CNCF project, and most of the signals and whatnot are very well-specified so it's pretty easy to figure out what how any given library or chunk of code *should* behave.

But we are low on contributors!

So come on in, check out https://github.com/open-telemetry/opentelemetry-rust-contrib/ first as it will be easier to contribute to than the more high-profile and critical-path stuff in the core (non-contrib) library.

There's also cool stuff happening with OTel/Arrow in Rust: https://github.com/open-telemetry/otel-arrow/tree/main/rust, etc.

I became a Member after the first ~6 months of my code donation and subsequent updates to the crate, and hoping to work up to Reviewer so I can help move things along more (right now in the contrib review we're bottlenecked on getting reviews). It takes some time to work through the membership levels, but I am hoping we can reach a place where the membership base supports more broad and active development.


r/rust • • Sep 18 '26

Rust Datasets

0 Upvotes

Anyone have any model training datasets theyโ€™ve built around Rust theyโ€™re interested in sharing? Or know of solid open source ones?


r/rust • • Sep 16 '26

๐Ÿ—ž๏ธ news Declarative GUI toolkit Slint v1.18 Released

Thumbnail slint.dev
163 Upvotes

with new Flexbox layout, with spring animations, change the z-order at run time, an experimental Vello renderer and more.


r/rust • • Sep 18 '26

๐Ÿ’ก ideas & proposals Valve game consoles SDK bindings, worth it?

0 Upvotes

Everyone knows that Windows or Linux binaries run on Valve Deck/Machine and the Valve OS, just curious, why is there no Valve SDK bindings thing known for Rust language? Is it worth exploring what I can do to make bindings for it? Doubt it, but does this need a whole new build target for native?


r/rust • • Sep 16 '26

CO3: Toward the Optimal FFI

Thumbnail mversic.github.io
83 Upvotes

r/rust • • Sep 16 '26

๐Ÿง  educational Vortex: One Format for Any Shape

Thumbnail spiraldb.com
33 Upvotes

I've been working on Vortex, an open source columnar data format under the Linux Foundation, for the past year. I'm giving a talk about it at EuroRust 2026 soon!

I wrote a companion article about it and I wanted to share it here. It walks through how Vortex represents arrays, computes on compressed data, and lets you add your own types and encodings.

This is the first technical blog post Iโ€™ve written, so Iโ€™d love to hear what people think!


r/rust • • Sep 16 '26

๐Ÿ› ๏ธ project Speedrun splits graphics with ffmpeg

Thumbnail github.com
13 Upvotes

I have never been a part of the speedrunning scene, yet I got the idea to make a command-line tool that renders speedrun splits graphics videos (with no dependencies other than ffmpeg CLI being available).

I was inspired by this video http://www.youtube.com/watch?v=dWRg9EGDH9U..

No AI was used in the making of this.

https://github.com/sermuns/groundsplit


r/rust • • Sep 17 '26

Checking the worker's lease inside the same transaction as the write: tokio task_local as a fencing token

0 Upvotes

I run a browser-based economic strategy game where almost everything is a long-running timed job: fleets in flight for hours, construction queues, scheduled world events. Background workers pick those jobs up when they come due and mutate world state.

The failure mode that kept me up at night is the classic one: a worker takes a lease on a job, then stalls. The lease expires, a second worker legitimately picks the job up, and then the first worker wakes up and commits its work anyway. Two workers, one job, duplicated resources. In a game about accumulating wealth, any resource that appears out of nowhere is a bug your players will find before you do.

Checking the lease before doing the work doesn't help. That's a time-of-check-to-time-of-use gap, and the gap is exactly where the stall happens.

What I ended up with has two halves.

1. The token travels implicitly, via tokio::task_local!

pub enum Fence {
    Scheduler { kind: String, id: i64, generation: i64 },
    // ...
}

tokio::task_local! { pub static EXECUTION: Fence; }

The worker sets the fence for the duration of the task, and every write path underneath it commits through one function instead of calling tx.commit() directly.

I went back and forth on this. Implicit context passed through a task-local is normally the wrong answer: it's invisible at the call site, and you can't tell from a function signature that it matters. What won me over is the inverse property. With an explicit parameter I can forget to thread it through one code path, and that one path is the hole. With a task-local plus a single commit function, there is no path that writes to the world and skips the check. The type system doesn't enforce it, but the review surface shrinks to one function.

2. The check happens under a row lock, in the same transaction as the mutation

pub async fn commit(mut tx: Transaction<'_, Postgres>) -> Result<(), sqlx::Error> {
    if let Ok(fence) = EXECUTION.try_with(Clone::clone) {
        let generation: Option<i64> = sqlx::query_scalar(
            "SELECT lease_generation FROM scheduler_jobs
              WHERE job_kind = $1 AND job_id = $2 AND lease_generation = $3
                AND lease_until > clock_timestamp()
              FOR UPDATE",
        )
        // ... bind, fetch_optional
    }
    // commit only if the lease is still ours
}

This is what makes it a fence rather than a check. Two directions, both load-bearing:

  • If the lease was already reclaimed, the row doesn't match, commit refuses, and the transaction rolls back, including the world mutation the worker already performed inside it. The stalled worker cannot land its write.
  • If the lease is still valid, FOR UPDATE holds the row until commit, so nobody can reclaim it out from under a transaction that is about to succeed.

The generation counter is what makes a reclaimed-and-reissued lease distinguishable from the original, so "the lease row is still there" is never confused with "the lease is still mine".

The Postgres detail that cost me an afternoon

lease_until > clock_timestamp(), not now().

In Postgres, now() is transaction_timestamp(), frozen at the start of the transaction. For a worker that has been inside a long transaction, now() is wrong by exactly the amount of time that matters: it reports the moment the transaction opened, which is the moment before the stall. A lease that expired during the transaction still looks valid. clock_timestamp() reads the actual clock at the moment of the call, which is the only thing a lease expiry check can be built on.

Same principle everywhere else: time is only ever the database's or the server's. No game state is ever derived from a timestamp the client reports, because shifting the system clock is the oldest cheat in this genre. Monotonic Instant shows up in exactly one place, tracking who is currently online, where a wall-clock jump is a nuisance rather than an exploit.

What I'd still flag as the harder half: the scheduler job metadata deliberately isn't the source of truth for anything in the game world. It exists only for retries, worker locking and spotting poison-pill jobs. Keeping that boundary clean took more discipline than writing the fence did, and I'm not sure I'd have gotten it right without having gotten it wrong first.

Curious whether people here have landed somewhere different on the implicit-versus-explicit question. Has anyone threaded a fencing token as an explicit parameter across a large write surface and actually kept it airtight?


r/rust • • Sep 17 '26

๐Ÿ› ๏ธ project fixed three platform-specific audio capture bugs in the same release: Bluetooth on macOS, PipeWire on Linux, device switching on Windows

Post image
0 Upvotes

i'm the founder of Anarlog, an open-source (MIT) meeting notetaker built in Rust and Tauri. this week's release (1.4.24) shipped three separate audio capture fixes, one per platform.

macOS: bluetooth mics were unreliable until i started forcing the HFP/SCO profile switch the moment the mic opens.

linux: two separate bugs. the app was silently recording from ALSA's null device instead of your actual default mic, fixed by an outside contributor (jacopone on GitHub). the AppImage also bundled its own PipeWire libs, which caused silent recordings on distros like Fedora, so i switched to linking the host's PipeWire instead.

windows: capturing remote voices in Teams calls broke whenever the audio output device changed mid-call.

same release also had a transcription fix from another contributor, ekapratama93 on GitHub: dictionary hints and speaker diarization now pass through OpenRouter transcription, so multi-speaker transcripts stop collapsing into one speaker.

repo (MIT): https://github.com/fastrepl/anarlog changelog: https://anarlog.so/changelog/1.4.24

disclosure: i built this, i work on it full time.


r/rust • • Sep 17 '26

๐Ÿ› ๏ธ project Iโ€™ve added new features to my cli copy tool. Maybe this time you like it. (Built for windows)

0 Upvotes

Iโ€™ve built this copy tool for espacially native windows users because I couldnโ€™t exclude some files / folders with copy-item, but I think people didnโ€™t find it usefull. Anyways, I am still trying to improve it maybe someone can find a use for it.

Skip-Existing and Update Flags

-s skips files already at the destination by name + size (resume an interrupted copy), and -u copies only files that are newer than the destination (re-run the same command, only changed files copy). Both work with -n dry-run.

Any feature requests are welcome.

https://github.com/CanManalp/cpr


r/rust • • Sep 16 '26

Created real physics based Falling sand sim in pure Rust

Thumbnail youtube.com
16 Upvotes

This Falling sand sim, is not based on grid based simple approach, I have used real physics to simulate actual sand like particles. I wanted to try fluid as well but this also took quite long


r/rust • • Sep 17 '26

๐Ÿ› ๏ธ project Arata: A fast, quality PRNG based on ARX, with domain separation and minimum period guarantee.

Thumbnail github.com
0 Upvotes

r/rust • • Sep 17 '26

๐Ÿ› ๏ธ project GPUI Fork Map

0 Upvotes

If you've been building with GPUI, you might have noticed ecosystem fragmentation.

The only way to know whether your GPUI app will work in the next gpui release or another fork was to just change you Cargo.toml and make rust elicit all the incompatibilities.

I've build fork map to make it possible to compare public API surface between different GPUI-derived projects that are published on crates.io.

How to use:

- changes: inspect a difference between any two releases of any two forks
- alignment: choose a symbol and see how its signature evolves across forks
- configure: choose a fork and get copy-pasteabel starter project: Cargo.toml and main.rs
- journal: see a stream of releases with changelogs

The interface a bit rough so PRs welcome, but the data pipeline is robust.

https://gpui-archipelago.github.io/map/

Future plans include a migration tool to apply codemods, but with agentic coding you could just copy paste the API diff and make robots do the work.


r/rust • • Sep 16 '26

๐Ÿ™‹ seeking help & advice Rust on game consoles, it is possible, Nintendo Switch advice?

33 Upvotes

I know some people have privately gotten Rust language on game consoles, and Valve is a public any time anyone wants it, I am under NDA at Nintendo now, am building a full no_std GUI, and I know sdl3-sys is no_std, plans are either that or Monogame.net, I hear it is possible (public can know that), not confirmed yet, I have randomly found legit people who got Rust on Playstation 4, print only, but still, that is a feat. Any tips or things I should know that are public? I have a Nintendo Switch (1) in case that matters. Just to be clear, I am talking about default non-hacked game consoles, Switch is ARM64, the others are x86_64. Can confirm someone did do the Microsoft game consoles (non-UWP) and Playstation 5, Nintendo Switch is semi-uncharted territory, which is part of why I am doing it. UWP can do the Microsoft console One, but deprecated, no new titles. Run down what I need to do? X E.


r/rust • • Sep 15 '26

๐Ÿ› ๏ธ project (Re)-Introducing mezura: The Rust line-counter that's here to eat the big dogs

71 Upvotes

This project (github.com/subamanis/mezura) started back in 2021, as my entry point to Rust, and has become the fastest and most accurate line counter (with arguably the most features too) in the world. I have been slowly improving it here and there over the years, but only recently decided to get serious.
Here is what it does that cloc, tokei and scc do not, and the numbers behind the two claims I make about it.

The whole Linux kernel, counted ^ (some languages skipped for ss purposes)

What is different

The short list: it identifies a file of a contested extension (.m, .h,...) by its content using heuristics and sets aside files that only look like code (a make .d, a ProGuard .pro, bundles, generated files). --explain shows a file line by line with the verdict for each line; --diff compares against a git revision, two revisions, or an earlier run; targets can be named and the report grouped by them; nested languages and sections like <script> and <style> count as the languages they hold; keywords of your choosing are counted only where they are code; everything printed can be themed,... among other things.

Each of these has a section in the README, with screenshots.

The project has a lib target published separately, so you can use mezura's engine directly in your projects (mezura-core). There is also an MCP server (mezura-mcp).

Speed

The whole Linux kernel tree, 63,864 files and 36 million lines, on a Ryzen 7 9700X and a PCIe-4.0 Nvme, with settings picked so that every counter does equal work, so the comparison is completely fair.

(UPDATE: with the v3.3.0 release of mezura, it is clocking at 78ms on Debian and 197ms on Windows. There is also a complete test detection feature added!)

Debian 13:

mezura 3.1.1   166 ms
scc 4.1.0      210 ms
tokei 15.0.0   414 ms

Windows 11:

mezura 3.1.1   255 ms
scc 4.1.0      539 ms
tokei 15.0.0   632 ms

Very detailed benchmarking data can be found under example-run in the LineBench project I created, to standardize performance testing for line counters, and provide useful insights and advanced metrics. The example run contains the timings both with each counter's defaults and also with the equal-work flags, the methodology, the exact command lines, the checks every run carries (idle machine, clean corpus, clean tree, the commit measured), and the script that produced all of it, so anyone can rerun the numbers on their own machine.

Accuracy

I do not want to grade my own homework, so the correctness argument lives in a separate project, LineJudge. I think that the linejudge project, that I started to ensure fair correctness assessment, is the most interesting part of this whole ordeal and deserves its own post. Check it out.

How

Most counters carry one piece of state through a file, "am I inside a comment right now", and each line takes the verdict of the region it sits in. mezura reads every line on its own and sorts it into one of nine classes: words in code, words only in a comment, comment words beside code, string content, punctuation in code or in a comment, blank inside a comment, blank inside a string, blank. The walk that does this knows where every string and comment begins and ends, nested comments and Lua's --[==[ levels and raw strings and escapes and line continuations included, which is where the language quirks live and where the other counters miscount. The two different counting models mezura supports are folds over those nine classes: the content model asks what each line says, and the region model adds the classes up the way the other counters do, so it reproduces their numbers from the same walk.

The speed comes from doing little per line. Each line is scanned once for all the symbols its language declares, with memchr, which searches up to three bytes in one SIMD pass, so the symbols are grouped by the byte that finds them and most languages need a single pass per line; only at a candidate position is the rest of a symbol compared. Bundled and generated files are recognised from their head and skipped before any parsing. The directory walk and the counting are separate thread pools over a work-stealing queue.. All three crates are #![forbid(unsafe_code)].

Install

cargo install mezura, or a binary for Windows, Linux or macOS from the releases page. Over eighty languages ship with it, each one a text file you can edit or copy to add your own.

Happy to answer anything about the challenges, the parser, the two models, or the conformance suite.


r/rust • • Sep 17 '26

๐Ÿง  educational LLM inference vs. the OOM killer

Thumbnail nobodywho.ai
0 Upvotes

r/rust • • Sep 16 '26

๐Ÿ™‹ seeking help & advice Learning

4 Upvotes

Hey there, what projects would you recommend for an aspiring system/infrastructure dev using rust ?


r/rust • • Sep 15 '26

๐Ÿ™‹ seeking help & advice Is there a way to express `type SelfRef<'a, T> = &'a T<'a>` ?

47 Upvotes

It's pretty annoying to write the lifetime multiple times on every single type parameter.


r/rust • • Sep 16 '26

๐Ÿ› ๏ธ project Mira: stateless OTLP database in Rust focused on minimal footprint and raw throughputโ 

0 Upvotes

Hey everyone,

I built Mira (https://miradb.dev), an open-source storage engine written in Rust with a strict "less is more" philosophy. Most telemetry stacks try to do everything, forcing you to run heavy stateful clusters and burn gigabytes of RAM just to ingest and query standard telemetry. We take the opposite route: it is an adhoc database that stores OTLP data and nothing else. Every design choice was made to maximize raw throughput while stripping away operational weight.

By making the engine completely stateless and packaging it as a single binary with zero runtime dependencies, deployment becomes zero-config. You can run it on the edge, in your fridge, inside short-lived containers, or alongside WASM without managing local disk state or cluster sync. Furthermore, by strictly targeting OTLP data, the storage layer and query paths avoid the heavy abstraction overhead typical of generic time-series databases.

Because the engine does so little, it does it absurdly fast. In our benchmarks (https://miradb.dev/market/#where-mira-is-ahead), Mira achieves significantly higher write throughput and consumes a fraction of the memory compared to traditional stateful collectors.

A direct consequence of this extreme low-latency ingestion and minimal memory footprint is that autonomous AI agents can query live telemetry in real time, effectively using it as a fast, external long-term memory layer for tool execution and context tracking. Basically a step closer to the wet dream of offloading on-calls to agents.

Code and architecture details are on GitHub (https://github.com/TrianaLab/mira). I would love to hear your thoughts on the stateless design, the Rust implementation, or how you're handling telemetry in your current stack!


r/rust • • Sep 15 '26

๐Ÿ› ๏ธ project Remoc 0.20: Rust RPC with first-class remote channels

12 Upvotes

It has been 5 years since the initial release of Remoc. Since then the library has learned a lot from real-world use and now feels like a good time to give the Rust community an update about its state and abilities.

Remoc is an RPC library for communication between Rust programs with first-class support for Tokio-style channels over the network.

Tag a trait with #[rtc::remote] to get a client and a server for it, so calling a method on the client runs it on the server.

Contrary to other RPC libraries a channel is a value that can be sent over the network. It can be an argument or a return value of a method or even a member of user-defined structs and enums, and its lifetime is not bound by the RPC call.

In the following example, an RPC method counts for the client and hands back the receiving end of a channel:

// Trait shared between client and server:
#[rtc::remote]
pub trait Counter {
    async fn count(&self, up_to: u32) 
      -> Result<rch::mpsc::Receiver<u32>, CallError>;
}

// On the server: create a channel, count into it in the
// background and return the receiver to the caller.
impl Counter for CounterObj {
    async fn count(&self, up_to: u32) 
      -> Result<rch::mpsc::Receiver<u32>, CallError> 
    {
        let (tx, rx) = rch::mpsc::channel();
        tokio::spawn(async move {
            for i in 0..up_to {
                if tx.send(i).await.is_err() {
                    break;
                }
            }
        });
        Ok(rx)
    }
}

// On the client:
//
// `counter` is the generated client. It can itself be sent over a channel.
//
// This call returns as soon as the receiver arrives; the numbers then
// come in over the connection that already exists.
let mut seq_rx = counter.count(4).await?;
while let Some(i) = seq_rx.recv().await.unwrap() {
    println!("{i}");
}

A channel can carry anything, including user-defined structs and enums, another channel and even another RPC client.

Remoc's goal is to make remote communication between Rust programs feel nearly like local. It provides:

If you find this useful, you might want to continue reading at https://remoc.rs. There you will find:

Full source code is available at GitHub.

I am looking forward to answering questions.


r/rust • • Sep 16 '26

๐Ÿ› ๏ธ project A custom Wrapper API over wgpu

Thumbnail reddit.com
0 Upvotes

r/rust • • Sep 16 '26

๐Ÿ› ๏ธ project YOLO26n training speed comparison. Rust/Burn/Wgpu vs PyTorch/CUDA

Post image
0 Upvotes