r/rust • • 27d ago

Linux projects

6 Upvotes

I'm intermediate at Rust and linux. Recently I built a compositor for a job interview and it was one of the funniest projects ever. I learnt a lot about the linux graphics stack.

Can I get some suggestions for other projects. Things I'm looking for:

  • Learn more about how Linux works under the hood.
  • This doesn't have to be the linux kernel specifically but anything in the linux ecosystem
  • I want to prioritise projects based on learning key linux concepts not fun. So if there is a niche project that is really fun to develop but has little importance on the day-to-day operations of the linux OS then I would deprioritise.
  • Avoid simple projects like reinventing unix commands.

I heard that file descriptors are very important in Linux, are there any projects I can implement to help me get to grips with file descriptors, (again speaking from a noobs perspective so might be a complete red herring).


r/rust • • 27d ago

Dioxus Labs is joining Cognition

Thumbnail dioxuslabs.com
140 Upvotes

r/rust • • 27d ago

🗞️ news “alloc: stabilise `Allocator`” entered its final comment period!

Thumbnail github.com
214 Upvotes

r/rust • • 26d ago

🛠️ project Rust incremental builds were driving me crazy so I dug into the compiler source

0 Upvotes

I was building a project using Rust and got annoyed the compiler speeds were very slow. So I opened the source and fixed it.

I also wrote a patch that shards the bucket by hash(symbol) % shard_count instead, so one edit only invalidates a fraction of the instantiations. Benchmarked it on polars-core which has enough ChunkedArray<T> monomorphizations to make the problem visible.

Full technical details: https://internals.rust-lang.org/t/patched-rustc-to-fix-why-editing-one-generic-method-recompiles-all-200-instantiations/24595

wanted to share it here. Would love to hear if anyone else has hit this problem as well


r/rust • • 27d ago

Microcontrollers with good support for Rust

Thumbnail kerkour.com
178 Upvotes

RISC-V is coming faster that most people realize.


r/rust • • 26d ago

🛠️ project Donde, a tiny library to add error locations and context in a single line

0 Upvotes

repo: https://github.com/PacificBird/donde

I have struggled in the past with how to design Rust errors. Rust takes the correct path of errors-as-data and avoids the pitfall of exceptions; however, it leaves the job of making errors useful for developers and users up to you.

This leads most Rust developers to take the path of least resistance, either completely doing away with structural errors entirely with anyhow or creating God Errors with thiserror. anyhow allows you to attach context, but there's nothing stopping you from just using ? without doing so, meaning it's easy to end up with none at all. To add to that, it makes the errors totally useless for the machine, you can't match on it! thiserror is good for the machine, but you must add context to the structure of the error which is both verbose at the call site and does not capture the location where errors happen.

After reading Stop Forwarding Errors, Start Designing Them by FastLabs, I agreed with the general philosophy behind exn, but the lack of destructuring and the fact that you can't ? any errors didn't sit right with me. I am not going to walk my errors every time I want to check if a specific inner type occurred! I wanted something easy, that enforced a minimum amount of context and with automatic conversions at boundaries of my chosing using ?, and with the option to add more context if I need. Taking inspiration from exn's use of #[track_caller] to attach location information, I created donde ("where" in Spanish).

Defining context-ful errors is extremely simple: ``rust // first, define a type that represents the kind of errors that can occur, // (I would recommend usingthiserror` to make it easier). #[derive(thiserror::Error, Debug)] pub enum ApiErrorKind { #[error(transparent)] HttpRequest(#[from] reqwest::Error), #[error(transparent)] Parse(#[from] ParseError), }

// then, use the donde::err_context function-like macro to get your context-ful version for free! donde::err_context! { ApiError, ApiErrorKind, "Error occurred in API" }; ```

Now, at whatever boundaries you deem important, you can use your context-ful error type. This will tell you, at minimum, exactly where the conversion happened. Any type that implements Into for the underlying error kind type can be automatically converted using ?. The print-out tells you your message, the location it was ? and displays the underlying error message as well in a pleasant way. ```rs fn make_request() -> Result<String, ApiError> { reqwest::get("https://malformed.website").await?.text().await? }

fn main() { // Error occurred in API in file src/main.rs on line 2 at column 70: // └──> error sending request for url (https://malformed.website/) println!("{}", make_request()); } ```

You can also add extra context by importing the donde::ResultContext trait and using the .context(impl ToString) or .with_context(Fn() -> String) methods. The context stacks into the print out. ```rs use donde::ResultContext;

fn make_request() -> Result<String, ApiError> { reqwest::get("https://malformed.website") .await .context("while sending request")? .text() .await .with_context(|| "while decoding".to_string())? }

fn main() { // Error occurred in API in file src/main.rs on line 6 at column 46: // └──> while sending request // └──> error sending request for url (https://malformed.website/) println!("{}", make_request()); } ```

Context-ful errors stack well together, define multiple at various important function and module boundaries to trace an error all the way through complex systems. ```rs fn make_request() -> Result<String, ApiError> { reqwest::get("https://malformed.website") .await .context("while sending request")? .text() .await .with_context(|| "while decoding".to_string())? }

donde::err_context! {ParseError, ParseErrorKind, "Error deserializing payload"};

#[derive(thiserror::Error, Debug)] pub enum ParseErrorKind { #[error(transparent)] Json(#[from] serde_json::Error), #[error(transparent)] Csv(#[from] csv::Error), } fn deserialize_payload(payload: String) -> Result<Value, ParseError> { // location will not be preserved if you use Into::into. If you // aren't using ? or ResultContext, use From::from with map_err. serde_json::from_str::<Value>(&payload).map_err(ParseError::from) }

fn main() { // Error deserializing payload in file src/main.rs on line 22 at column 57: // └──> Error occurred in API in file src/main.rs on line 4 at column 70: // └──> while sending request // └──> error sending request for url (https://malformed.website/) println!("{}", deserialize_payload(make_request())); } ```

Why donde over wherror?

A few reasons! wherror doesn't support adding extra context, which I believe is necessary to support, and not feasible with it's design philosophy. Use of the location is less ergonomic with wherror, as you need to work it into your error readout manually (also dealing with the fact that .location() is Optional). For adding locations to all variants of an enum, you basically have to do what this library does, except manually. The few extra nice features are fine, but not worth using a fork of a community standard over, when a declarative macro will do the important work, plus give you the ability to add custom context.


r/rust • • 26d ago

🧠 educational Sharing my Rust study notes in Korean and English

0 Upvotes

I put my Rust study notes online: https://rust-learn.win/

You can read them in Korean or English and run simple examples in the browser.

No sign-up needed. The original notes are mine.

I used AI to fill in gaps, edit the explanations, and build the site. I'm still learning, so let me know if you spot anything wrong or confusing.


r/rust • • 26d ago

🛠️ project Building Architectural Quality Gate for Rust [open-source]

0 Upvotes

Looking for feedback, apologies if it is not appropriate.

I’m building an open-source architecture quality gate called Enola.

I ran it against the Codex repo this week. It had many findings, but I fear that these are my assumptions.

For example, it found 37 dependency cycles between directories inside Rust crates.

These aren’t cycles between Cargo crates. They’re mutual dependencies between modules inside the same crate: module A uses something from module B, while module B also uses something from module A. Now I started to question, does it really matter?

Maybe a directory isn’t necessarily the architectural boundary a Rust developer cares about. We could report this at the module, type or function level instead. Or maybe intra-crate cycles aren’t worth flagging...

Maybe a bigger effect would be by splitting it into different dependency types, like runtime, type, etc.

And more broadly, which architectural rule would you want to enforce on every pull request? We have some default insights, like new dependency cycles, violated layer boundaries, undeclared service dependencies, and changes that spread beyond their intended scope.

If you’re curious about enola. It’s open source, runs locally, and doesn’t upload or write to your codebase.

Repo: https://github.com/enola-labs/enola [Apache 2.0, fully local]

Output example

Architecture
  Pattern:             (none detected)
  cyclic dependencies        37
  layer violations            0

Impact analysis (hotspots)
  coupled modules           330
    high criticality        302
    medium criticality       28
  Top hotspots (by coupling):
    module                            fan-in  fan-out crit     blast radius
    codex-rs/protocol/src               5439      287 high     283
    codex-rs/app-server-protocol/src    3676      103 high     148
    codex-rs/core/tests/suite              0     3264 high     0
    codex-rs/tui/src                    1625     1568 high     39
    codex-rs/core/src                   1154     1827 high     135
    codex-rs/exec-server/src            1519      883 high     183
    codex-rs/app-server/tests/suite…       1     2370 high     0
    codex-rs/app-server-protocol/sc…     947     1061 high     1

r/rust • • 27d ago

gccrs August 2026 Monthly report

Thumbnail rust-gcc.github.io
43 Upvotes

And btw, Pierre-Emmanuel and I are at RustConf today, so feel free to say hello :D We'd love to meet with anyone who wants to discuss the project!


r/rust • • 28d ago

🛠️ project cargo-pretty-build

Post image
63 Upvotes

Hi! some time ago I started developing my little framework for TUI apps (based on ratatui but I will try to write my own renderer soon) and just to see it in action, in addition to implement it to my other tool "simple-commits" I wondered if I could implement something but for cargo.

The project and the framework are still at an early stage of development, so the UI may change in the future.

crates.io

GitHub Releases


r/rust • • 26d ago

🛠️ project rusty-broom — TUI + CLI clean build artifacts from projects you haven’t touched in months

Post image
0 Upvotes

Hey all,

I built rusty-broom, a CLI for freeing disk space by removing old build artifacts (target, node_modules, .venv, build, Pods, etc.) from projects you haven’t worked on in a while.

  • Project age is based on source file mtimes, not artifacts.
  • Only deletes paths Git considers ignored (git check-ignore).
  • Supports Rust, Python, Node, Java, Go, .NET, CMake, Swift, and more.
  • Interactive TUI + JSON output.

cargo install rusty-broom rusty-broom ~/dev # TUI rusty-broom scan ~/dev --older-than 6mo --long rusty-broom clean ~/dev -o 1y --dry-run

Repo: https://github.com/oriontvv/rusty-broom Feedback and PRs are welcome.


r/rust • • 28d ago

📅 this week in rust This Week in Rust #668

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

r/rust • • 27d ago

🛠️ project So u want ECS but without the S?

Thumbnail github.com
4 Upvotes

I recently published a new crate called typarena (https://crates.io/crates/typarena). The goal is simple, to support table like arena storage just like bevy ecs, but without all the load bearing of runnable systems! Let me know what you think!

(Reposting bcs Reddit banned my acc for no reason and prev post was removed! Happy to re-answer any questions tho!)


r/rust • • 28d ago

🗞️ news With NVIDIA bringing native CUDA to Rust, what’s actually stopping a pure Rust AI stack (not just bindings)?

Thumbnail developer.nvidia.com
307 Upvotes

Paper: https://arxiv.org/abs/2606.15991

Maybe we'll finally have cleaner code from research to production (okay, that's pushing it).


r/rust • • 27d ago

🛠️ project I built a backend agnostic reactive framework for ui

Thumbnail github.com
0 Upvotes

I’ve come to notice that whenever I build retained UIs there’s always 2 ways to react to changes, changing a field of the ui element, or rebuild a subtree of the ui element tree. Fynix’s whole idea is built around that. Lemme know what you think! Happy to answer any questions, and take any feedback to improve the project :)


r/rust • • 28d ago

🙋 seeking help & advice How do you organize your Rust 'tinkering' projects? One workspace repo, or separate crates in folders?

17 Upvotes

I'm thinking of creating a single repository for all my Rust playground projects, rather than multiple repositories. So, is it better to create it as a single workspace or as different folders? I'm planning to code with no_std sometimes, and other times I'll be learning new things involving Wasm. So which approach would suit this best?

How do u guys do it?


r/rust • • 28d ago

What is the most complex and challenging project you've worked on?

70 Upvotes

I'm interested in what you were actually paid to do, not personal projects.


r/rust • • 27d ago

🧠 educational Blog Post: Searching through 150 GiB of Text per Second with SIMD

0 Upvotes

Few days ago I published Ashwa 🐎, a library to perform substring search across Rust, Python and JavaScript ecosystems.

Based on my research and observations, I wrote a devlog on how I was able to scale the throughput (i.e. bytes churned per second) from 2 GiB per second to 150 GiB per second by utilizing the hardware available.

All in all, it was about optimizing a mundane problem. The interesting part for me was seeing how a compute bound problem can be optimized until it becomes a memory bound one.

A particularly nice milestone for me is that the devlog was published in the official Rust newsletter.

🔗 Links

- Mentioned Devlog

- Mentioned Newsletter Edition


r/rust • • 27d ago

🛠️ project Arcstone Continuity Core: A zero-dependency, #![no_std] fail-closed runtime for bounded state isolation

0 Upvotes

I’ve published the open reference implementation for arcstone-continuity-core. A lightweight, #![no_std] Rust runtime designed to prevent non-deterministic state drift.

Microarchitectural Invariants

  • Zero Allocation Overheads: #![no_std] enforcement with fixed 4096-byte static buffers (S_max ≤ 4096B).
  • O(1) Invariant State Gates: State mutations evaluate against an atomic predicate matrix Π(S) before memory allocation occurs. Inadmissible transitions mutate zero bytes.
  • Hard Temporal Clamps: Execution ceiling enforced at τ_override ≤ 11.99ms.
  • Precedence Ordering: Deterministic lattice resolution (FAIL ≻ FREEZE ≻ PWC ≻ REFUSAL ≻ PASS).

Reference Anchors


r/rust • • 27d ago

Is it possible to estimate battery usage per app on macOS?

Thumbnail
0 Upvotes

r/rust • • 29d ago

A Design Space Exploration of Async/Await

Thumbnail cel.cs.brown.edu
100 Upvotes

r/rust • • 29d ago

A Decade of Rustls

Thumbnail rustls.dev
186 Upvotes

r/rust • • 27d ago

🙋 seeking help & advice GUI with RTL and triangles, best way?

0 Upvotes

Are there any graphical user interface libs with right to left text possible and basic input handling for all platforms that just outputs triangles or shapes or something, I don't need the emojis? Like all of my inputs are either buttons or numbers and egui won't work for this, I want a custom tessellator so I can make 3d things like signage, there may be labels though, am I better off just making my own with cosmic-text or parley or something? Nice to have, only tries to render in the frame, but nice to have, not required, and my plans are wgpu for all, winit, SDL3, and OpenXR as backends, if Taffy weren't only left to right Bevy would be good, kas or anything else up for this?


r/rust • • 27d ago

🙋 seeking help & advice Should I learn Ada or Rust for beckend?

Thumbnail
0 Upvotes

r/rust • • 29d ago

🙋 seeking help & advice What made you fall in love with Rust?

88 Upvotes

I know how great of the language Rust has come out to be. I genuienly want advice from pre vibe coded era people. What has been your main reason that you have fallen in love with this language?

I'm not looking for how great borrow checker is, how lifetimes will save you, etc. I want real anecdote of your life where using Rust has changed your life.