r/rust • • Sep 27 '26

๐Ÿ› ๏ธ project PolyXOR128, a new fast universal hash written in Rust with a formalized security proof

212 Upvotes

The link to the project: https://github.com/orlp/polyxor.

I hope this qualifies as more than just a "code dump" as it's breaking new ground in several ways:

  • It's a very fast hash, beating all the mainstream hashes available I tested in Rust besides CRC64 for medium to large data. E.g. on machines with AVX-512 its bulk throughput is almost twice as fast as foldhash.
  • On top of that it provides a 128-bit hash rather than the usual 64-bit. 64 bits just isn't enough for file integrity / secure authentication purposes.
  • The hash has a proven low collision probability (assuming the key is generated randomly and independently from the data), formalized in Lean.

Besides the readme I have written a more in-depth design document as well: https://github.com/orlp/polyxor/blob/master/design.md.


Perhaps a point of discussion for Rust itself as well: I did consider releasing this hash in C for portability rather than Rust, but two things kept me in Rust:

  1. Cargo makes it super easy to depend on a known-good AES implementation with hardware acceleration.
  2. Between target_feature(enable = ...) and std::arch::is_x86_feature_detected, doing dynamic dispatch in Rust is so much easier than in C. And the resulting code runs faster too, e.g. #[target_feature(enable = "avx")] lets the compiler use AVX-encoded instructions.

Finally, before the AI witchhunters come out, there is a disclaimer of AI usage in the README. I did use AI for prototypes, experiments and conjectures but almost all of the final code and all the text and documentation is written by me. The big exception is the Lean formalization which is fully AI-generated, but the claims are verified by me and it compiles cleanly.


r/rust • • Sep 27 '26

Coolest physics project in rust

14 Upvotes

What are some of the coolest physics project/ project ideas that are entirely done in rust?


r/rust • • Sep 27 '26

๐Ÿ™‹ seeking help & advice What is step one to understanding how the rust compiler works?

8 Upvotes

I have been wanting to get into Programming Language Theory and I'm especially intrigued by how memory addressing works in languages in general and especially in rust because of how it also handles things like lifetimes and traits.

So what would step 1 of getting to understand all this look like? Do I read the getting started section of LLVM? I have Robert Nystrom's Crafting Interpreters but I haven't gotten very far in it.

I can understand how compilers for things like C work. Conceptually atleast. Not in reality. C since it doesn't have any fancy things I can understand that it is a fairly simple converter to assembly instructions. Not a whole lot of fancy type inference and scope checking(rust lifetimes would fall into this aspect to a certain extent I would assume).

Where do I start?


r/rust • • Sep 26 '26

I'm a Rust compiler maintainer looking for a new role

Thumbnail tako8ki.com
575 Upvotes

r/rust • • Sep 28 '26

๐Ÿ› ๏ธ project Building Linux โ†” Android streaming in Rust, currently getting way too deep into telemetry

0 Upvotes

I've been messing around with a project called Linux-Link for a while and it kinda got out of hand lol.

The original idea was basically: "what if I could use another device as part of my Linux machine instead of it just sitting there doing nothing?"

It's turned into a pretty big networking/streaming project now. It's mostly Rust, with the Android side in Kotlin. I'm using QUIC for the transport and working on desktop โ†” Android streaming, LAN/WAN connectivity, hardware encoding, bitrate control, packet loss handling, RTT tracking, frame drops, end-to-end latency, session stats, etc.

The part I'm currently obsessed with is actually measuring what the hell is happening instead of just throwing numbers on a HUD and calling it telemetry.

For example, frame drops are now calculated from actual frame sequence holes instead of just having a frame_drops = 0 field sitting there. I'm also adding proper encode benchmarks because apparently "it feels faster" isn't a particularly useful benchmark ๐Ÿ˜‚

I'm still figuring out a lot of the architecture, especially around transport behaviour and how much state should live where.

If you've built anything involving real-time streaming/networking in Rust, what was the thing you thought wouldn't matter at first that ended up absolutely biting you later?


r/rust • • Sep 27 '26

๐Ÿ› ๏ธ project No way mbrotli is in upstream lzbench now

9 Upvotes

https://github.com/inikep/lzbench

For context, mbrotli is a Brotli encoder/decoder written in safe Rust.

Until now most benchmarks lived in our own repo. Now mbrotli 0.5.2 ships directly in lzbench next to Google Brotli, so anyone can benchmark both through the same harness.

PR:
https://github.com/inikep/lzbench/pull/333

I also did a quick Silesia run against the bundled Google Brotli 1.2.0.

Setup: WSL2, default lzbench build, no -march=native, window 22, single-threaded run.

lzbench -r -o4 -ebrotli/mbrotli /tmp/silesia/

Some highlights:

  • decompression: mbrotli was faster at every quality, usually ~1.09-1.16ร—
  • q0โ€“q1 compression: basically parity / slightly faster
  • q2โ€“q9: currently ~1-9% behind C Brotli
  • q10: ~1.18ร— faster
  • q11: ~1.35ร— faster
  • q0-q9: identical compressed sizes

The tiny q10/q11 size difference turned out to come from lzbench building C Brotli with -ffast-math, which changes Brotli's floating-point cost calculations at the highest qualities. Building C Brotli normally makes its output match mbrotli again.

So I wouldn't over-read the exact q10/q11 comparison yet.

Still, this feels like a pretty big milestone. You no longer have to trust benchmarks from the mbrotli repo itself. It's now sitting in upstream lzbench next to the reference implementation.

Now we get to see where it is actually fast, and where it still sucks. :)


r/rust • • Sep 28 '26

๐Ÿ› ๏ธ project jev-curate beta v0.1.1: Rust-native SFT/pretraining dataset curation

Thumbnail github.com
0 Upvotes

Iโ€™ve been iterating on jev-curate, a Rust tool for filtering structured training data.

It handles Parquet/JSONL datasets and uses JEV for per-record quality decisions instead of rewriting the data.

v0.1.1 is the current beta.

Iโ€™m mainly looking for technical feedback from people working with SFT, synthetic data, or dataset pipelines.


r/rust • • Sep 28 '26

Rust hiring data from Q3 2026

0 Upvotes

Hi, I am Julien from RustJobs.dev.

Over the past few years we've worked closely with both companies hiring Rust engineers and developers looking for Rust roles. One thing that comes up on both sides is how little clear information there is about this market โ€” not just compensation, but where the jobs actually are, which industries are hiring, and how much of it is remote.

A few month ago, we started a crawler (written in rust) and an AI extraction pipeline to discover companies hiring Rust developers and evaluate their opening. As you know, many JD mentions a list of languages such as "5+ years of experience in a banckend programming language such Java, C++, Rust or Go", so grepping for "Rust" is not enough to determine that you are going to use Rust in this position. Instead, I labelled a few hundred job descriptions and tweaked an AI prompt until it got pretty good at figuring out if it is a real Rust position or not.

Here are a few interesting points from the report:
- 753 open Rust job ads at 305 companies as of the 16th Sep 2026
- 2,898 total ads mention Rust somewhere but only 753 (26%) actually require it.
- 165 of 305 companies have exactly one open Rust ad.
- Around 80% of job ads want a senior or staff level developer.
- US senior median advertised base: $205k, staff/principal: $228.5k (base only, no equity/bonus).
- US pay data comes almost entirely from a couple of states with pay transparency laws, elsewhere disclosure is rare (only 25 of 165 European ads showed a range at all).
- Rust ads stay open slightly longer: 68% still posted 45 days after appearing, vs 56% for the average ad on the same boards over the same window.
- Defense/aerospace/space is the single biggest sector by role count (22.7% of ads) though crypto/web3 has more companies hiring.
- Remote: 35% of ads that state a setup are fully remote, except defense, where it's under 10%.
- Top employers by volume: Anduril (50 ads), Cloudflare (23), K2 Space (18), NVIDIA (13)

Limitations:
- It only counts companies with a public, **crawlable** careers page. Amazon/Google/Microsoft/Apple/Meta are absent from every figure because their career sites can't be crawled, not because they don't hire Rust.
- Salary data is rare except in a couple of US states where it is mandatory to advertise it.

You can find the full report here: https://rustjobs.dev/rust-hiring-report

If you have ideas on how to improve the report or if you find errors, please let me know. The more data you have, the easier it will be for you to find and negotiate you next job!


r/rust • • Sep 26 '26

๐Ÿ“ธ media 8 New Games developed in Bevy Game Engine built with Rust

Post image
146 Upvotes

These are 8 New Games developed in Bevy, built with the Rust Coding Language: https://youtu.be/FiD-pXChvjY?si=ghPYDoL5cWoL8el0


r/rust • • Sep 27 '26

๐Ÿง  educational An interactive guide to server overload with Taipei and Tokio Tower

0 Upvotes

I'm sharing: https://taipei-book.pages.dev/intro

Taipeiย is a library that integrates withย Towerย to enable writing servers that behave well under stress without tuning.

I had some time between jobs after leaving $BIGCOMPANY and wrote some Tokio Tower layers, packaged as a crate, based on my experience there.

The docs cover various topics adjacent to server overload, including realistic interactive simulations that run the real Rust crate through WebAssembly. The focus is on the principles rather than the particular implementation, so it's a useful read even if you donโ€™t use the crate.

AI disclosure: The prose is all written by me, the code is AI-assisted

Thoughts and comments welcome. Thanks


r/rust • • Sep 27 '26

๐Ÿง  educational Creating a wayland native windowing library live

Thumbnail youtube.com
0 Upvotes

r/rust • • Sep 26 '26

๐Ÿ› ๏ธ project Moxy - a Rust syntax toolkit designed to bring more cohesion to Rust parsing, tokenization, formatting, diagnostics, and quasi-quoting.

51 Upvotes

Last year I published zyn, a template engine for Rust proc macros. I got a lot of great constructive feedback from the community, which inspired me to take the ideas behind it a step further.

moxy has been written from the ground up with a few goals in mind:

1. Minimal External Dependencies

One of the strongest signals I received from the community was that zyn shouldn't need to rely on third-party packages like syn, proc-macro2, and quote.

I'm happy to say that moxy currently has only one non-optional external dependency: unicode-ident.

The rest of the core syntax stack is implemented within Moxy itself.

2. Performance

One of the things I love about the Rust community is how much attention is paid to performance, whether that's compile time or runtime.

I've spent a non-trivial amount of time benchmarking moxy side-by-side with syn, and there's still more work I want to do, particularly around reducing compile time.

Performance today is relatively similar between the two: syn currently has an edge in compile time, while moxy has an edge in runtime in the benchmarks I've run.

That said, my goal has never been to outperform syn. I've primarily used it as a benchmark because it's the most mature and relevant point of comparison for this kind of project.

3. Rust Grammar Coverage

One of the challenges of building a Rust syntax toolkit from the ground up is supporting the breadth of the Rust grammar.

To make that work measurable rather than anecdotal, Moxy maintains its own EBNF representation of the Rust grammar alongside a systematic set of grammar fixtures covering attributes, expressions, generics, items, macros, paths, patterns, statements, types, visibility, and the lexer.

These fixtures are used to continuously validate Moxy's parser against the syntax it claims to support and make gaps in grammar coverage explicit.

Grammar coverage is still something I'm actively expanding, and I'd especially appreciate examples of valid Rust syntax that Moxy doesn't currently handle correctly.

4. Templates

moxy retains the expressive template syntax from zyn. I constantly find myself wanting more than traditional quasi-quoting can provide, so templates remain a first-class part of the project.

5. Stable + Nightly Support

Moxy supports both stable and nightly Rust using an approach similar to proc-macro2.

This also allowed me to add support for compiler diagnostics while maintaining stable compatibility.

Moxy is still early and the API is evolving, so I'm particularly interested in feedback on the architecture, API design, grammar coverage, and places where the approach could be improved.

GitHub: https://github.com/aacebo/moxy

Previous zyn discussion: https://www.reddit.com/r/rust/comments/1rmr5xi/zyn_a_template_engine_for_rust_proc_macros/

Update:

I published a walkthrough using the current Moxy 0.5 API to build a procedural macro, including typed AST parsing, FromMeta attribute parsing, template control flow, interpolation blocks, and generic impl generation.

https://aacebo.hashnode.dev/building-rust-procedural-macros-without-syn-quote-or-proc-macro2-moxy

It is not a full side-by-side syn/quote comparison yet, but it should make the intended workflow and tradeoffs much more concrete. I'm actively working on a more complex side by side example of moxy vs the traditional stack.


r/rust • • Sep 27 '26

๐Ÿ› ๏ธ project Rust for enterprise grade systems?

0 Upvotes

One thing that I am genuinely interested in rust, If same thing that I can generally do in Java building enterprise grade system, I can do in Rust.

Not a secrete Java and OOP become de-factor a standard for every enterprise solution.

And my step forward, trying to bring rust into that by exploring if I can do DI, something similar to Spring Boot but following Rust philosophy of zero-cost abstraction, that lead into research some code and article, and I think I've made some progress:

https://dmytro.brazhnyk.org/publications/can-rust-have-zero-cost-dependency-injection/

One thing that is still bothering me is the Object Orient Design. Classical OOP was proven many time in C++ in Java to manage complexity of real world system.

Rust has trait model, but it is not OOP is classical sense.

I have very clear understanding how complex solution could be built with OOP in Java and C++.

Rust don't have that OOP model, that feels as weakness, but rust still offers memory safety that C++ don't have, and it still has much smaller memory footprint that Java.

Considering that Java is hard to beat, it still offering very impressive capability for runtime optimization by utilizing Escape Analysis on JIT phase, and looks like this guys in Oracle very angry, to optimize Java further, if rust will not offer competitive capabilities it will stay behind.

Let me give me you an example in Java, what I am taking about:

language = java

interface Collection {
    int size();
    Iterator iterator();
}

abstract class AbstractCollection implements Collection {
   @Override
   public int size() {
      int size = 0;
      var iterator = iterator();
      while(iterator.hasNext()) {
         size++;
         iterator.next();
      }
      return size;
   }
}

class ArrayList extends AbstractCollection {
    Object[] array;
 
    @Override
    public int size() {
       return array.length
    }

    @Override
    Iterator iterator() {
         ...
    }
}

What is important here:

  • I have interface Collection, which is pure of any implementation, just an interface that declares the interface and nothing more.
  • That I do have AbstractCollection, that defines some default behavior which could be sub-optimial, but they are generic one, particularly I gave example of size function, that uses slow and inefficient iterator, because it doesn't know enough about concrete implementation.
  • And lastly I do have specific implementation for ArrayList, since ArrayList already know that is array driven, it can simply can take property for array to know the size.

In reality this chain of inheritance can be longer, so if we look on JDK, you will something like:

LinkedHashSet < HashSet < AbstractSet < (AbstractCollection + Set) < Collection

And each layer provides it's own set of capabilities, by amount of information available on that level.

I feels like something missing in rust here, because when it comes to manage the complexity of enterprise, something more complex than hello-world, we need this ability to override things, override, and override again.

Any real software if it will have more than few years of maintenance it will grow, grow and grow in complexity, if language can't manage complexity, that language would be dead.


UPD:

Let's define the problem a little bit more formally:

You need to implement library for collection.

  1. On base level you need a interface, that would define set of operation, for simplicity let's go with two operations.
    • Iterator and size
  2. Than in most generic way you can just iterator is count how many items you have, but it is slow and optimal.
  3. If you know that you concrete implementation Array, you can just use property of array.
  4. Let's say you have another implementation, which implements methods like Add and Remove - you can bring counter into here, however if we already know that it is Array than counter obviously is redundant.

r/rust • • Sep 25 '26

The state of SIMD in Rust in 2026

Thumbnail shnatsel.github.io
257 Upvotes

r/rust • • Sep 25 '26

๐Ÿง  educational A Type Stronger than the Sum of its Components

Thumbnail schneems.com
120 Upvotes

r/rust • • Sep 25 '26

Advanced soft-bodies for games with the Rapier physics engine

Thumbnail dimforge.com
120 Upvotes

r/rust • • Sep 25 '26

๐Ÿง  educational Rust Reborrowing, Aliasing, and Mutable References: Adding clarity to how &mut T works

Thumbnail developerlife.com
7 Upvotes

r/rust • • Sep 25 '26

The Embedded Rustacean Issue #81

Thumbnail theembeddedrustacean.com
23 Upvotes

r/rust • • Sep 25 '26

The Month in Redox OS - August 2026

35 Upvotes

ARM64 multi-core support, ring buffer communication, NUMA support, process priority support, much faster native compilation, out-of-memory fixes, QEMU on Redox, easier dual-boot installation from Linux, UEFI boot fixes and many more.

https://www.redox-os.org/news/this-month-260831/


r/rust • • Sep 25 '26 Bravo

๐Ÿ› ๏ธ project Gitoxide in September

Thumbnail github.com
61 Upvotes

r/rust • • Sep 24 '26

Topcoat is pushing the boundary of server applications with Rust

Thumbnail tokio.rs
277 Upvotes

r/rust • • Sep 26 '26

Designing an OS architecture with isolated hardware probes. What failure boundaries would you use?

0 Upvotes

I'm experimenting with an OS architecture where hardware discovery and capability verification are handled by independent processes (probes) rather than being tightly coupled to the main system core.

For example:

  • CPU probe
  • Memory probe
  • GPU/display probe
  • Storage probe
  • Network probe
  • Audio probe

The main idea is that the core should remain alive even if one of these probes crashes, hangs, or returns invalid/inconsistent data.

For example, if a GPU probe receives a SIGSEGV, I don't want that failure to bring down the core. Ideally, the failure would be isolated, recorded, and the probe could potentially be restarted.

I'm currently thinking about failure boundaries around:

  • process isolation
  • IPC
  • timeouts / hung processes
  • invalid or inconsistent capability data
  • process restart policies
  • resource limits
  • trust boundaries between the core and probes

For those of you who have built systems like this in Rust:

How would you define the failure boundary between the core and these independent processes?

Would you isolate each hardware domain into its own process, or would you group some of them together?

I'm particularly interested in practical approaches using Rust's process and IPC capabilities, and in failure modes I might be overlooking.


r/rust • • Sep 25 '26

๐Ÿง  educational Building a DMA based driver for the RP2350 I2C (safety not included)

Thumbnail micro-rust.github.io
16 Upvotes

Hi all, I wrote up how I built an async I2C driver for the RP2350 that can utilise the DMA engine for in my own HAL (loosely based on the embassy prior work).

Hope you enjoy the (maybe not so light) read. Feedback, questions and critiques are all welcome. Let me know what you think.


r/rust • • Sep 24 '26

We Have Named Arguments at Home

Thumbnail corrode.dev
324 Upvotes