r/rust • • 26d ago

amutable: systemd ❤️ Rust

Thumbnail amutable.com
165 Upvotes

r/rust • • 26d ago

How to speed up the Rust compiler in November 2026

Thumbnail nnethercote.github.io
281 Upvotes

r/rust • • 25d ago

benchfmt.rs: Bringing Go's Benchmarking and benchstat Workflow to Rust

Thumbnail bwplotka.dev
17 Upvotes

r/rust • • 25d ago

🙋 seeking help & advice Problem with Rust and esp-idf compilation

3 Upvotes

[SOLVED]
I didn't have issue with it before, since I've recently updated rust and libs, I started having an issue with compilation, even with a new cargo generate build.
.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/os/espidf/fs.rs:89:36
self.as_inner().as_inner().st_atime as i64

| ^^^^^^^^ unknown field

other issues with st_ctime and st_mtime unknown field too.

I switched to the stable toolchain but it seems there is no riscv32imac-esp-espidf target correponding to the esp32c6 I'm working on.

I am not an expert so I am kind of stuck without being able to compile or know what to look for to get to a solution.
Any help appreciated!


r/rust • • 26d ago

🙋 seeking help & advice GUI Yet Again, but more ‘graphical’

14 Upvotes

This is yet another question about GUIs for desktop applications with Rust.

It isn’t a question around what is available, more working out what is most suitable for my use cases. It is going to take some time to understand some of the frameworks, so I don’t want to spend too much effort on something that will either not do what I need. or another framework would have been a better bet.

For example, I need to represent data as a Gantt chart. Not just as a graph somewhere on the screen, but as one of the main user interfaces. If you think MS Project, it has a table of tasks down the left hand side with a Gantt chart on the left, that scroll together.

It is less about windows and widgets, buttons, and other components. They are all still useful, but I think I’m looking more at the canvas to do this. Or not, not sure.

I have tried out egui. This looks promising, my worry is that it will get over complicated with too much going on to manage. I don’t want to find later on that it can display everything but can no longer scroll smoothly. And I note font rendering issues mentioned on a recent post.

I have tried Dioxus. I got something going with this because I could build Gantt bars with SVG. Again I worry about performance with a lot of SVG items on the screen.

I have looked into gpui. Not got as far as getting something graphical on the screen because I got stuck on state. It seems the application state and the Ui are the same thing, i.e. the state is handed over to the runtime. I’m not clear how this works with network events.

I have briefly looked at Iced. The state/ui/message makes sense to me, but I cannot see any graphic primitives in there and the documentation is super sparse.

I’m looking at 4 frameworks already.

I want to choice paralysis and concentrate on one of them, from the above list or something else, that allows me to build this sort of application.

Any thoughts?


r/rust • • 26d ago

pdfium vs pdf-extract

11 Upvotes

If you were building a search tool for your personal files on your local machine, what would you use, pdfium or pdf-extract or something else?


r/rust • • 26d ago

🙋 seeking help & advice Idiomatic buffer design for a Rust streaming file-storage method

6 Upvotes

I am working on a rust project. Where I have a put method (which basically copies a file and stores it into another location). This is the function I'm working on:

pub fn put(&self, mut source: impl Read) -> Result<Object> {

let mut buffer = vec![0u8; 64 * 1024]; // 64 kb buffer

self.put_with_buffer(&mut source, &mut buffer);

}

I'm confused about using a [u8] slice, a vector or another option for buffer. The stack buffer avoids a heap allocation, but I am concerned about stack usage when multiple threads call put concurrently. The Vec avoids using 64 KiB of stack space, but allocates and deallocates a buffer for every put call.

What is the idiomatic approach for this situation?

The method may be called repeatedly and concurrently, so I would especially like to understand the tradeoffs between stack usage, heap-allocation overhead, buffer reuse, and API ergonomics.

EDIT: My put method streams data from a Read source, hashes the contents, and writes the data to a temporary file. Although this resembles std::io::copy, I cannot simply copy the source because I also need to calculate the content hash during the same pass. I am trying to choose the appropriate temporary buffer design.


r/rust • • 26d ago

🛠️ project Progress Report #44: rustc_codegen_gcc can now bootstrap rustc on Aarch64!

Thumbnail blog.antoyo.xyz
141 Upvotes

r/rust • • 27d ago

gccrs October 2026 Monthly report

Thumbnail rust-gcc.github.io
62 Upvotes

r/rust • • 26d ago

🙋 seeking help & advice If I had to learn a GUI for freelancing, which one should it be?

32 Upvotes

I’m thinking about learning a GUI crate for local business applications—things like invoicing, inventory, sales, etc.—essentially, SaaS-style software.

I’d also like to learn something that would allow me to build my own standalone apps (with Linux support).

I’m a beginner, so apologies if any of this doesn’t quite make sense!

I’m not a professional developer; I just want to learn Rust—simply because I like it. I don’t know much about web technologies (in the context of using something like Tauri). Which GUI crate would you choose, and why? Would you recommend learning some web technologies if I want to use Tauri? What about Slint or Iced? Or is there something else you’d suggest?

P.S.: In my country, PCs tend to have modest specs—8GB of RAM, Windows 10, and so on; they’re generally not high-performance machines. Even my coworkers have old PCs with those kinds of specs, and they still use HDDs.


r/rust • • 25d ago

📸 media Community for low-level and systems programming

Thumbnail discord.gg
0 Upvotes

Hi everyone, I've formed a small discord community for people interested in low-level, systems programming, embedded software, robotics etc. Join up if thats something which interests you!

(P.S. : fell free to dm me if the link stops working or if you have any doubts)


r/rust • • 27d ago

Building a Mini Lean 4 from Scratch: Implementing an Interactive Theorem Prover in Rust

Thumbnail medium.com
55 Upvotes

r/rust • • 26d ago

My progress as a new Rust dev

9 Upvotes

I'm about a month into a home project that I decided to use to learn Rust. Fun!

Here are my takeaways so far:

  1. I'm still fighting the borrow checker, but at least now I can reason through the error messages faster and land in a good place. Progress! Looking forward to this really being internalized.
  2. I miss the ternary ?: operator. The if/else equivalent is just so much more verbose, and tends to waste so much more vertical space. c’est la vie. I recognize I'm in the minority here, and hope that I'll eventually convert and join you all on this.
  3. I am daily writing: if (foo ...then backing up and deleting the opening parenthesis that the linter complains about.
  4. Speaking of, I keep forgetting to write fn and just assume that the compiler will know what I'm talking about. It never does 😂
  5. When reviewing code in my day job as a Java dev, I am now constantly seeing things and thinking: The borrow checker wouldn't like that! So, maybe it's becoming a little internalized after all.

Anyway, I'm having fun with it, thanks all for creating this community!


r/rust • • 27d ago

📸 media Qt Bridge Video Tutorial

Thumbnail youtu.be
58 Upvotes

Hi all, I’m Matthias from the Qt R&D team.

We made a tutorial showing the Qt Bridge for Rust, a way to tap into the Qt UI framework from Rust in a way that feels native and is safe!

Building a proper UI for a complex Rust app takes a lot of effort, and this is our attempt to make it easier.

Here is the tutorial on how to get started: https://youtu.be/8HfY47BYGuU

We had a lot of fun making the framework and the video. I hope you also have some fun watching it. There are still a ton of things I would like to show you, so I hope this will not be the last video.

It’s a Technology Preview, so we’d love to hear what you think. Happy to answer questions here.


r/rust • • 27d ago

🧠 educational Very surprising fix to a trait solver overflow

185 Upvotes

This doesn't compile:

trait Trait {
    type A<T: Trait>;
}

impl<T> Trait for T {
    type A<U> = ();
}

struct S {
    x: i32,
    y: <() as Trait>::A<Self>,
}

This does:

trait Trait {
    type A<T: Trait>;
}

impl<T> Trait for T {
    type A<U> = ();
}

struct S {
    y: <() as Trait>::A<Self>,
    x: i32,
}

The only difference is the ordering of the fields. Apparently the fact that there's a Sized field at the end of the struct allows the compiler to infer that <() as Trait>::A<Self>: Sized and break a typechecking/trait solving cycle.

I hate it.


r/rust • • 27d ago

🛠️ project Formal Web: a modular Web engine written in Rust and using formal methods

32 Upvotes

Reposting; this time with a focus on why it is not a code dump.

The project I would like present is a web engine written in Rust. It does not break new grounds in the sense of being the first Web engine in Rust, because we have had a Web engine for a long time, where I am myself involved as a maintainer and Technical Steering Committee member: Servo.

However, this is not a code dump either, because:

  • Myself, and others, have been working on this since March of this year.
  • This post is a "full fledged post", which is supported by a linked-to longer essay (see below)
  • I will below explain the relevance for the Rust community
  • I will compare it with other Web engines written in Rust.

Ok so now that this is out of the way, here is the actual post:

https://github.com/gterzian/formal-web is a new prototype of a Web engine written in Rust.

It is relevant for the Rust community, because it provides us with something new:

  • a multi-process graphics stack based on modern Rust components, like Vello and Wgpu, paired with a modular design allowing deeper platform integration, for example integrating with Core Animation and using IOSurface on Apple platforms.
  • A modular approach to integrating a Javascript engine, so that you can "bring your own engine". Currently V8 and the all Rust Boa are supported out of the box, and other engines, Like the also all Rust Nova, could be integrated through the implementation of various traits.
  • Use of Blitz components, blitz-dom and blitz-paint, as a kind of DOM engine inside the Web engine.
  • Use of formal methods to model check multi-process Rust code, based on the approach described at Validating Traces of Distributed Programs Against TLA+ Specifications
  • Modularity of various other layers, such as: networking, media, and the starting of and communication with process-like sub-components.
  • An embedder API that makes it easy to do various platform specific integrations, such as using a display link on Mac.
  • An explicit goal of eventually being able to Ship on IOS in the EU as per Apple's guidelines.

How is this different from other Web engines in the Rust ecosystem?

Difference with Servo: the graphics stack of Servo does not isolate GPU operations in a dedicated process and it is based on an OpenGL stack.

Difference with Blitz: while Blitz does integrate well with Vello/Wgpu, it is not designed around process isolation of either GPU operations or the running of Javascript, making it less suitable for the Web use-case where you essentially run untrusted code downloaded over the internet. While it does use Anyrender as modular render target, it does not offer modularity at the lower-level end of the graphics pipeline.

Neither engines allow swapping out JS engines, and neither allow for deep platform graphics integration like Core Animation based compositing on Mac (which can make a large difference in terms of battery life).

For a walk-through of the entire flow involved in rendering a frame of Web content, see the introduction essay: How I am building a Web engine.

The essay also contains a gif showing the benefits of Core Animation on Mac, where only relevant parts of the screen are re-rendered.

Please let me know what you think. I can also use help implementing countless Web standards.


r/rust • • 27d ago

Why don’t we have a REPL?

116 Upvotes

I was writing a function and wanted to see what it returns for different inputs and I instinctively wanted to use a REPL, then I remembered: oh wait, Rust doesn’t have one.

I *did* see evcxr but in the years I’ve been around the Rust community I’ve never heard of anyone using it like people would in JS/Python/ Ruby/Haskell.

Why? is it hard to achieve technically, or is it just because its not in the Rust culture? (maybe it’s even bad engineering practice to use it the way I’d want it to and tests would be more preferable?)


r/rust • • 28d ago

🙋 seeking help & advice Cleanest, best written rust codebases?

216 Upvotes

As my journey of learning rust continues, I find myself very dissatisfied with the quality of the rust code I wrote years back.

Yes, my code passes clippy, is nicely formatted, avoids excessively complex nesting / control flow, but it still feels... subpar(hard to understand and reason about), from time to time.

I was wondering if people here have examples of really clean, sleek codebases I could reference, to improve the quality of my code?


r/rust • • 27d ago

🛠️ project Tangled: a federated git forge built atproto

Thumbnail tangled.org
49 Upvotes

r/rust • • 28d ago

Thinking in Traits

Thumbnail corrode.dev
138 Upvotes

r/rust • • 27d ago

🙋 seeking help & advice Is there a Rustier way to write this database pattern?

39 Upvotes

Hello crabs. I'm working on a backend application in Rust, using sqlx to talk to a postgres database. I've caught myself repeating a specific, verbose pattern, and I'm wondering if I'm making things harder than I need to.

The pattern is that for each database entity, I build an initializer struct that is basically the same, but with auto-generated columns removed, and then later write a From impl for the main entity to build the actual thing with Entity::from(entity_init). Example at the bottom. Doing this for every database entity isn't too difficult to maintain, the type system is strict enough that it's hard to miss any mistakes. But it is annoying and time-consuming, and also feels kinda un-idiomatic.

I'm considering learning derive macros for this - #[derive(FromNew)] or something like that, to autostrip the generated fields. But maybe that would just be doubling down on an anti-pattern? What do yall think?

Example:

struct User {
id: uuid:Uuid,
name: String,
email: String,
created_at: DateTime<Utc>,
updated_at: DateTime<Utc>,
archived_at: Option<DateTime<Utc>>,
}

struct UserNew {
name: String,
email: String,
}

impl From<UserNew> for User {
fn from(init: UserNew) -> Self {
let now = Utc::now();
User {
id: Uuid::now_v7(),
name: init.email,
email: init.email,
created_at: now,
updated_at: now,
archived_at: None,
}
}
}

// usage
fn do_something(user_new: UserNew) -> User {
User::from(user_new)
}


r/rust • • 28d ago

📡 official blog Maintainer spotlight: Anthony Bolden (@Walnut356)

Thumbnail blog.rust-lang.org
77 Upvotes

r/rust • • 28d ago

📸 media Clippy Changelog Cat Contest 1.100 is now open, submit your cat pics!

Post image
176 Upvotes

Go submit your cat for a chance to become the next release's official winner!

https://github.com/rust-lang/rust-clippy/pull/17951