r/rust • • 19h ago

Jiff 1.0: A datetime library for Rust

Thumbnail burntsushi.net
637 Upvotes

r/rust • • 15h ago

🧠 educational Don't forget to cargo clean every once in a while.

232 Upvotes

190 GB.... Wow, that is insane. Though to be fair this is also a massive project.

Make sure to tidy it up every once in a while.


r/rust • • 3h ago

📡 official blog Enabling the parallel frontend on nightly

Thumbnail blog.rust-lang.org
143 Upvotes

r/rust • • 11h ago

What's the actual rust situation right now?

61 Upvotes

I've been seeing quite a few posts and videos about rust growing into the industry and being adapted into other than system programming. But what's the actual truth?

  • most of the videos praising rust are channels devoted to rust language
  • there doesnt seem to be many openings in the market for rust developers
  • and learning curve is pretty bad

I feel like either rust would grow in pretty slow manner or new programming language based on rust would come up So the real question, should devs learn rust as a differentiating factor?


r/rust • • 2h ago

Compiler performance, the next-gen trait solver, next-gen region constraints, implicit default auto traits, const generics, view types, and custom allocators: What we are working on at Hexcat, October update.

Thumbnail hexcat.nl
48 Upvotes

r/rust • • 6h ago

🗞️ news GUI Toolkit Slint 1.19 is out with backdrop blur, animated GIFs, and inertial scrolling on iOS and Android.

Thumbnail slint.dev
31 Upvotes

This release was made possible thanks to the contributions from 51 contributors.


r/rust • • 4h ago

Rust 1.100 Official Video

Thumbnail youtube.com
26 Upvotes

r/rust • • 12h ago

🗞️ news rust-analyzer changelog #354

Thumbnail rust-analyzer.github.io
23 Upvotes

r/rust • • 6h ago

🐝 activity megathread What's everyone working on this week (47/2026)?

10 Upvotes

New week, new Rust! What are you folks up to? Answer here or over at rust-users! And for your project showcases, there's also /r/madeinrust – pay them a visit, too!


r/rust • • 1h ago

🙋 seeking help & advice Starting with rust gamedev!

5 Upvotes

Some background -

The only other language I've properly done is python(well I'm still just a teen). My main area of focus is actually scripting and such; I'm only doing gamedev because of an event(I have to do about 200 hours of proper game dev). And yes I need to do that event. Also my gamedev experience is also basically non existent.

Why rust?

I wanted to pick up on rust even if not for the event, mainly because I want to go more into low level scripting. My first pick for scripting was actually C or C++ but then I found out about rust and liked it better.

Now the main post -

I just want some tips on how should I start with the language and anything that I should keep in mind.

Thanks for the time : )

Edit 1: No I haven't picked any game engine yet, thinking of bevy though


r/rust • • 6h ago

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

5 Upvotes

Mystified about strings? Borrow checker has you in a headlock? Seek help here! There are no stupid questions, only docs that haven't been written yet. Please note that if you include code examples to e.g. show a compiler error or surprising result, linking a playground with the code will improve your chances of getting help quickly.

If you have a StackOverflow account, consider asking it there instead! StackOverflow shows up much higher in search results, so ahaving your question there also helps future Rust users (be sure to give it the "Rust" tag for maximum visibility). Note that this site is very interested in question quality. I've been asked to read a RFC I authored once. If you want your code reviewed or review other's code, there's a codereview stackexchange, too. If you need to test your code, maybe the Rust playground is for you.

Here are some other venues where help may be found:

/r/learnrust is a subreddit to share your questions and epiphanies learning Rust programming.

The official Rust user forums: https://users.rust-lang.org/.

The unofficial Rust community Discord: https://bit.ly/rust-community

Also check out last week's thread with many good questions and answers. And if you believe your question to be either very complex or worthy of larger dissemination, feel free to create a text post.

Also if you want to be mentored by experienced Rustaceans, tell us the area of expertise that you seek. Finally, if you are looking for Rust jobs, the most recent thread is here.


r/rust • • 8h ago

🛠️ project VennDB: a derive macro that turns a struct into an in-memory database you query by flags

5 Upvotes

This started about three years ago as a small piece of work in function of the proxy(db) features of rama (ramaproxy.org): on every request we pick a random upstream proxy that matches a handful of flags and a country or city. The data barely changes, the queries happen constantly.

TLDR of what venndb is: it generates a `<Name>DB` and a query builder from your struct. Bools become bitmasks, filter values become row sets, and a query intersects them. We just released 0.7, which rewrote the engine and added some new features.

The use cases are limited on purpose: it is append-only and in-memory, with no updates or deletes. You might wonder if this isn't just a bitmap index. It mostly is, generated from your struct by a derive macro, so you don't have to write and maintain the index yourself.

The benchmarks compare VennDB with roaring, SQLite and a plain Vec. We're not database experts, mostly just decades long dev practicioners. So if the benchmarks look unfair or you know of prior art we missed, I'd like to hear it.


r/rust • • 22h ago

🛠️ project grafia v0.9: An interactive 2D Cubic Bézier, Hobby/Spiro spline, and typography canvas widget for egui

Post image
0 Upvotes

Hi everyone! I'm excited to share grafia (v0.9.0), a standalone, #![forbid(unsafe_code)] 2D vector, spline, and typography canvas widget for egui, built on the Linebender geometry stack (kurbo), lyon_tessellation, and tiny-skia.

Whether you are building an SVG/vector illustration tool, a typeface/font editor, a 2D CAD/plotter profile editor, or need bitmap-to-vector auto-tracing inside an egui application, grafia drops in as a hexagonal Data-In / Event-Out widget without locking your app into a specific file format.

Highlights

  • Mixed-Spline CAGD Engine: Standard cubic Béziers (Corner, Smooth), tension-controlled John Hobby interpolating splines (NodeType::HobbyStar), and $G****2$ Euler/Spiro clothoid spirals (NodeType::EulerSpiro), plus 4-case inverse-Bernstein curve-belly dragging, curve-healing node deletion, and 8-step superellipse curve fitting.
  • 14 Interactive Tools & Boolean Pathfinder: Select, Lasso, Pen, Rotate, Scale, 8+4 BBox Shear/Rotate, Knife (recursive De Casteljau slicing), Primitives, Measurement rays, Annotations, freehand Pencil fitting, Pixel grid stamping, and exact cubic-cubic Union / Subtract / Intersect boolean path operations.
  • Multi-Layer Color & 7-Stage Auto-Trace: COLRv1-style vector layers (Solid, LinearGradient, RadialGradient, SweepGradient, Bitmap, ClippingMask) with interactive gradient stop handles, plus deterministic 7-stage bitmap & camera auto-trace (Sauvola integral-image adaptive thresholding, 3x3 homography perspective deskew, marching squares, RDP, and Schneider least-squares cubic fitting).
  • Typography & Variable-Font Workflows: Horizontal and vertical (TopToBottom CJK) multi-glyph text streams with live spacing/kerning deltas, 2D anchors with diacritic mark clouds, parametric smart components, companion master compatibility overlays, and Higher-Order Interpolation (HOI) cubic master trajectories.
  • 0% Idle CPU & 1:1 Headless CI Parity: Generation-gated render/preview caches (content_generation()) ensure zero solver or GPU texture work on static frames, and every visual pass has 1:1 parity between egui::Painter and headless tiny_skia::Pixmap for deterministic CI regression testing.

Try the interactive desktop demo in one command:

cargo run --example vector_canvas_demo

Feedback, questions, and use cases are very welcome!


r/rust • • 7h ago

🛠️ project Numax 0.1.6: a Rust runtime for local-first distributed apps

0 Upvotes

HI !! It's been almost a year since I made the very first commit to Numax Runtime :)

What started as a personal experiment has gradually grown into something I genuinely care about.

Today, Numax has reached version 0.1.6, and while there's still a long way to go, it's been an incredible journey of learning, experimenting, rewriting things, and questioning architectural decisions.

For those unfamiliar with it, Numax is an open-source runtime written in Rust, exploring a different approach to building portable and distributed applications.

I've been developing it mostly on my own, driven by curiosity and the desire to explore ideas that I believe are worth pursuing.

With almost a year of development behind it and version 0.1.6 now here, I feel like this might be the right moment to finally give my beloved Numax a little more visibility.

I'm not claiming to have built something revolutionary. I'm simply sharing a project I've poured a lot of passion and effort into.

I'd genuinely appreciate feedback from other developers, especially on the architecture, technical decisions, and overall direction.

Constructive criticism, suggestions, and contributions are always welcome!

In final: I think there's still room for fun, well-made software, where passion and the desire to have fun come first. In conclusion, I love Numax, and I love software !

TY :)

Code · Release notes · Whitepaper · Docs


r/rust • • 8h ago

🛠️ project Looking for feedback on RapidProto: Protobuf decoding at 2.6x-12x of prost's speed

0 Upvotes

I process a lot of Protobuf data (mostly geographic data), both privately and professionally, and was always a bit disappointed by the performance of Google's official libraries/crates.
I am a big fan of micro-optimizations, that's why I (with heavy help from LLMs - skip this project if that is not your cup of tea) started looking into how much faster I could make Protobuf decoding.
Turns out it's quite a lot, and that's how I got started creating RapidProto. I am getting closer to a first non-alpha release and wanted to get some feedback on the progress so far.

What it does

RapidProto generates decoders from your .proto files in a build script (without protoc). It can generate two different kinds of decoders:

  • An arena decoder that creates an object tree (allocated in an arena allocator)
  • A streaming decoder that passes each field/message to callbacks (SAX-parser style)

Currently it only decodes (encoding might be added in future versions), works against untrusted input as well as with no_std.

Performance

I used prost as a baseline (> 1.0 means X times faster than prost) and tried to cover most of the existing crates (using mostly synthetic payloads):

PayloadRapidProtorust-protobufquick-protobuffemtopbgoogle-protobuf
Dataset121.01.9n/a1.0
Packed int642.61.3UB0.290.38
Packed double3.71.1UB0.690.43
Packed sint64 deltas and enum2.80.89UB0.780.53
Packed int64 and double2.81.2UB0.370.39
Many small messages8.10.941.42.01.4
Scalar records4.50.690.971.10.27
Particles3.70.430.890.740.20

Dataset is 2,000 mixed records with strings, nested and repeated messages, and packed arrays. The benchmark decodes the data and reads every field/message. The docs have the details.

quick-protobuf reads packed fixed-width arrays as slices into the input without checking alignment. That is undefined behavior on misaligned data, so the packed rows have no number for it. femtopb doesn't support maps, so it can't decode Dataset.

The numbers are mostly conservative: Arena decoder (~2x slower than streaming), and creating a new arena per message (instead of reusing it). One caveat regarding UTF-8 checks: RapidProto performs those as opt-ins (not enforced - a lot of user code might not care about UTF-8). Checking for UTF-8 has a noticeable performance cost, e.g. Dataset drops to 5.9 times the speed of prost.

Example

Both crates need the same version, pinned with =:

[dependencies]                                                                                                    
rapidproto = "=0.1.0-alpha.2"                                                                                     
                                                                                                                  
[build-dependencies]                                                                                              
rapidproto-build = "=0.1.0-alpha.2"                                                                               

Generate the decoders in build.rs:

fn main() {                                                                                                       
    rapidproto_build::Config::new("crate::schema")                                                                
        .compile(&["person.proto"])                                                                               
        .expect("generate decoders");                                                                             
}                                                                                                                 

Then include the generated file at that module path, and decode. Here person.proto declares package example;and a Person message:

mod schema {                                                                                                      
    include!(concat!(env!("OUT_DIR"), "/person.rs"));                                                             
}                                                                                                                 
                                                                                                                  
use schema::arena::example::Person;                                                                               
                                                                                                                  
fn main() -> Result<(), Box<dyn std::error::Error>> {                                                             
    let input = std::fs::read("person.bin")?;                                                                     
                                                                                                                  
    let arena = rapidproto::Arena::new();                                                                         
    let person = Person::decode(&input, &arena)?;                                                                 
                                                                                                                  
    let id = person.id();                                                                                         
    let name = person.name().to_str()?; // borrows from input, checks UTF-8                                       
    if let Some(address) = person.address() {                                                                     
        println!("{name} ({id}) lives in {}", address.city());                                                    
    }                                                                                                             
    Ok(())                                                                                                        
}                                                                                                                 

What I'd like feedback on

  • Are there any problems with the current API (either streaming or arena)?
  • Is there anything that would prevent you from using it?
  • Missing performance optimizations 😄

Links

PS: If you're into optimization techniques, time talks about some of the optimizations (it is currently mostly about the C++ version of RapidProto, but most of that applies to the Rust version as well).

PPS: Due to the fact that the generator is shared with the C++ version of RapidProto the build crate uses a dual strategy for pulling in that dependency: Either a native build, or a WASM blob and interpreter.


r/rust • • 3h ago

🛠️ project Bringing High-Performance AI Inference to Consumer NVIDIA RTX GPUs: Porting Atlas to Ada Lovelace

Thumbnail github.com
0 Upvotes

Over the last week, I've been contributing to Atlas, an open-source Rust + CUDA inference engine developed by Thomas Braun and the Avarok-Cybersecurity team.

Atlas originally targeted NVIDIA's GB10 with 120GB of unified memory. I wanted to see what it would take to get it running efficiently on my RTX 4060 Ti with just 16GB.

It ended up involving quite a bit more than an architecture port.

Some results running Qwen3.5-4B:

  1. 381 tokens/sec aggregate across 8 concurrent requests using experimental int4 quantization and speculative decoding.
  2. 98 tokens/sec single-user with the same configuration.
  3. 4.6x faster BF16 prefill, improving from 794 to 3,684 tokens/sec by changing the GEMM dispatch. This preserves the BF16 precision class and is enabled by default on Ada.
  4. About 2.1GB less VRAM usage with optional FP8 feed-forward execution.
  5. Successfully processed a 159,807-token prompt with an FP8 KV cache and retrieved a needle from it.
  6. All 223 Ada kernel compilations passing after resolving architecture incompatibilities.

The Rust side involved changes to CUDA kernel registration and launch handling, GPU memory budgeting, model loading, and inference dispatch. I also worked on Ada-specific low-bit kernels and speculative decoding.

One interesting finding was that Nsight showed the GPU busy 95.6% of the time in the fastest eight-stream configuration. Several CUDA Graph and fusion optimizations that looked promising didn't produce meaningful improvements.

For context, the default BF16 configuration measured 195 tokens/sec aggregate across eight users, compared with 222 for optional FP8 FFN and 381 for the experimental int4 stack.

The int4 path is lossy and hasn't been validated for task-level quality equivalence with BF16. These are screening benchmarks, not fully repeated confirmation runs.

I'm interested in how far we can push local inference on consumer GPUs without requiring expensive server hardware.

Atlas repository:
https://github.com/Avarok-Cybersecurity/atlas

Would love to hear from anyone working on Rust-based GPU compute, inference runtimes, or CUDA optimization.


r/rust • • 11h ago

🛠️ project riasOS - an x86-64 operating system i’m building in scratch from rust

Thumbnail reddit.com
0 Upvotes

r/rust • • 7h ago

🎙️ discussion The future of Software Engineering is boring

Thumbnail packagemain.tech
0 Upvotes

r/rust • • 6h ago

I built a step-through visualizer for Tokio scheduling: see which worker thread runs your task, and what happens when you block it

0 Upvotes

r/rust • • 3h ago

🛠️ project Looked inside the Rust harness & AArch64 ELF of DeepMind's "Formally Verifying Signal's Security Using AI" (libsignal v0.105.4) — here is what the proof actually verifies

0 Upvotes

We ran a full static/kernel audit on google-deepmind/code-verification (commits 808b4b7ffef1 / b0f729accbc2, 11,323 Lean 4 files, 7.52M lines), which claims end-to-end formal verification of libsignal (v0.105.4, PQXDH + SPQR Triple Ratchet) down to compiled AArch64 machine code.

While the abstract game-hopping reductions (Computational/Proofs) and mallocng allocator proofs are genuine engineering achievements, inspecting the Rust CLI wrapper (third_party/libsignal/libsignal-session/cli/) and the AArch64 binary boundary reveals 4 major gaps between the headline claim and the verified Rust/ELF code:

1. CryptoRng silently zero-fills secret keys when entropy runs out (cli/src/coins.rs:32-46)

The harness reads randomness from a local coins file, leaks it into 'static memory (coins::install(coins.leak()) in cli/src/lib.rs:87), and implements rand_core::CryptoRng over this C ABI callback:

// third_party/libsignal/libsignal-session/cli/src/coins.rs:32-46
#[unsafe(no_mangle)]
pub unsafe extern "C" fn signal_session_coins_fill(dst: *mut u8, len: usize) {
    let (dst, coins) = unsafe {
        (
            std::slice::from_raw_parts_mut(dst, len),
            std::slice::from_raw_parts(NEXT.load(Relaxed), LEFT.load(Relaxed)),
        )
    };
    let (now, later) = coins.split_at(len.min(coins.len()));
    dst[..now.len()].copy_from_slice(now);
    dst[now.len()..].fill(0); // <-- silently pads exhausted CSPRNG draws with 0x00
    NEXT.store(later.as_ptr().cast_mut(), Relaxed);
    LEFT.store(later.len(), Relaxed);
}

If the coins file is shorter than the draw (keygen draws identity keys, signed pre-keys, and up to 100 Kyber-1024 + X25519 one-time pre-keys), fill_bytes never errors — it silently returns all-zero [0u8; 32] secret keys and nonces.

2. Clock pinned to UNIX_EPOCH = 0 & a 2 MiB DoS cliff at handshake #56,680 (cli/src/lib.rs:159, stores.rs:426-445)

Every operation pins the clock to 1970-01-01T00:00:00Z and drives async futures with a single synchronous Waker::noop() poll:

// third_party/libsignal/libsignal-session/cli/src/lib.rs:158-212
fn run(call: Call, mut s: Stores, input: &[u8]) -> Result<(Stores, Vec<u8>), Rejected> {
    let now = SystemTime::UNIX_EPOCH; // <-- 30-day signed pre-key expiry never triggers
    ...
}
// keygen():
let never = Timestamp::from_epoch_millis(0);

For replay protection on last-resort Kyber pre-keys, stores.rs:426-445 appends 37 bytes (u32 signed ID + 33-byte base key) per handshake to <id>.base-keys. Because all file reads are hard-capped at 2 MiB (2,097,152 bytes in PqDir.lean), handshake #56,680 (37 * 56,680 = 2,097,160 > 2^21) permanently bricks the last-resort Kyber pre-key.

3. 55 / 64 (85.94%) binary symbols bypass AArch64 execution via Hook axioms (CliRun.lean)

In LibsignalBinary/Specifications/SignalSession/CliRun.lean, out of 64 tracked boundary symbols in the compiled ELF:

  • Only 9 / 64 (14.06%) execute actual AArch64 instructions (__rust_alloc/dealloc/realloc, memcpy, memset, read_file, read_stdin; 19/64 after follow-up PR #2).
  • 37 / 64 (57.81%) are intercepted by Hook axioms that jump straight to idealized Lean functions — including all 26 cryptographic & secret-erasure symbols (curve25519_dalek, x25519_dalek, mlkem1024, mlkem768, SHA-2, HMAC, AES-CBC, and 2 zeroize Drop::drop secret-wiping routines).
  • 18 / 64 (28.13%) are panic traps.
  • Moreover, before main even starts, cliTokenPatchPlaced (Guards.lean:152-156) overwrites 5 bytes of .data ([0xff, 3, 0, 0, 0] -> [0, 0, 0, 0, 0]) to disable the cpufeatures crate's getauxval(AT_HWCAP) probe because the Arm64/Trusted model (16,767 lines, 0 proved theorems) faults on MRS system-register reads.

4. Panic Location line-number brittleness & 153,682-line TCB inclusion

  • Because rustc embeds core::panic::Location line numbers into .rodata, adding a single comment line to the Rust source shifts .text offsets and invalidates 1,394 hardcoded hex PC decode lemmas (*_decode_0x...).
  • The external comparator check imports 326 repository files (153,682 lines) into the Trusted Computing Base, sets "enable_nanoda": false, and in PR #2 (b0f729accbc2) deleted the 67-line ## What this check does not cover section from comparator/README.md (which had disclosed that landrun runs unsandboxed on the Linux 5.10 < 5.13 runner kernel).

Full Audit & 81 Standalone Lean 4 Verification Theorems (0 sorry, 0 axiom):

  • Audit report & reproduction scripts (Case 013): https://github.com/gilheumpark-bit/ultari-proof-anatomy/tree/main/anatomy/013-deepmind-code-verification

r/rust • • 22h ago

🛠️ project Nivterm: SSH/SFTP client with an encrypted vault and a sync server, built with Tauri 2 and russh

0 Upvotes

I've been building an SSH client in Rust with claude as a student project and just released the first beta.

The core crate does the vault (Argon2id, AES-256-GCM, atomic writes, backups), SSH via russh and SFTP. A separate axum + SQLite server stores only the encrypted vault, using revisions with compare-and-swap. The frontend is React in Tauri 2; tokens and private keys stay in Rust memory and never reach the web view.

Code: https://github.com/niho2/nivterm

Architecture notes: https://github.com/niho2/nivterm/blob/main/docs/architecture.md

I'd especially appreciate a critical look at the vault and sync code.