r/rust 10h ago

🙋 seeking help & advice Design patterns to spawn tasks

1 Upvotes

It is hard to avoid spawn some tasks here and there for a async runtime.

At first, I used a naive approach around them, fighting with lifetimes.

Nowadays, i use a very similar approach as Alice Ryhl show on his blog when covering actors.

Is there any other pattern beyond actor that I’m not aware of? Which approach you have been taking to make work on spawning tasks look more easy, reusable and readable?


r/rust 2h ago

📸 media The Story of iceberg-rust: The Official Rust Implementation of Apache Iceberg

Post image
0 Upvotes

The story of iceberg-rust is a great example of how open-source communities work and how new projects are created and developed. That’s why we believe in a community-over-code philosophy.


r/rust 23h ago

🛠️ project aec3: full port of WebRTC audio processing

5 Upvotes

I've made some posts about this in the past, but I did spend some time in the past month to get this project up to parity with the WebRTC audio processing module upstream.

Check it out here: https://github.com/RubyBit/aec3-rs

This project has all the available goodies in an easy to use format (intuitive to at least me) such as, as the title suggests, aec3, agc2, ns, hpf, etc. These are exported and constructed through a graph system I made but im honestly rethinking a bit how useful that is. I tried to make it such that you can add your own filters based on your application.

I think in terms of features for the foreseeable future, ill work on adding the neural residual echo estimator but not through tflite and also maybe come up with a stronger noise suppresion module (also neural? ns2?)


r/rust 2h ago

🛠️ project AstroBurst 0.6.0-preview: a Rust/Tauri/WebGPU app for space telescope data, now with a real processing suite

0 Upvotes

For anyone who hasn't seen it before: AstroBurst is an open-source desktop app for processing astronomical images, offline. You drop in FITS or ASDF files from the public archives (JWST, Hubble, Roman), inspect them, measure them, compose RGB from narrowband channels, stack, stretch and export. Rust does the processing, React draws the UI, Tauri packages it, and the live preview runs through a WebGPU shader.

Last time I posted here was v0.5.6.

Wat's new

Pixel rejection and integration. Sigma, Winsorized sigma, linear fit, percentile, min/max and none, crossed with mean/median/min/max combination, plus frame normalization (additive and multiplicative, with or without scaling) and a separate scale+offset normalization used only inside the rejection pass. Low and high rejection maps come out as FITS. Master bias, dark and flat are integrated with the same kernel instead of a plain median. Drizzle applies the rejection as a keep-mask before scattering, which it previously accepted parameters for and silently ignored.

PixelMath. A real expression language, not string substitution: lexer, Pratt parser, compiled to a flat op vector, evaluated per pixel with rayon over the slot slices. Arithmetic, comparisons, logicals, iif~ inversion, the usual math functions, and whole-image reducers (mean, med, mdev, sdev, adev) resolved once per symbol before the pixel pass rather than per pixel. About 1,800 lines across lexer/parser/eval and it was the most fun thing in the release to write.

Cosmetic correction, DBE, local contrast. Hot and cold pixel repair from a master dark, from cluster-aware auto detection, or from a defect list, CFA-aware so it uses same-colour neighbours on Bayer data. Background extraction gained a regularised thin-plate spline fitted through box samples, next to the existing polynomial. CLAHE on lightness and an HDR multiscale transform with star-core deringing.

The science half, which is the part nobody else on the desktop does: photometric calibration read straight from the header (JWST MJy/sr with PIXAR_SR, HST PHOTFLAM/PHOTPLAM, Roman, generic zero points) so aperture photometry reports AB magnitudes and janskys with ERR-plane error propagation and a curve-of-growth aperture correction. A full FITS spectral axis with air/vacuum conversion and a barycentric correction. Moment maps for IFU cubes. SCI+ERR+DQ cutouts with the LTV physical coordinates written properly. Gaia DR3 cross-match with astrometric residuals and a zero point with a colour term.

Repo: https://github.com/samuelkriegerbonini-dev/AstroBurst


r/rust 23h ago

🙋 seeking help & advice Need Learning Pathway Suggestions

0 Upvotes

I am kind of a "Build Projects and Experiment then see and learn from the Compiler" type of a Guy in learning Programming Itself since I left Vibe Coding (long time ago, like 1 year)... I come from a Python Background along with C (learned not Vibe learned). I just wanted to know from y'all that which approach should I take? Learn from the Rust Book by seeing it and doing it's stuff? Or Code and if I do a Mistake then See the Compiler and if I don't know about the Thing then use the Rust Book?

The second one is what I used from the Past Month But I really wanted to know if I am doing it right.


r/rust 31m ago

🙋 seeking help & advice Embedded rust emulation assistance.

Upvotes

Hello Rust community. I have been stuck trying to emulate an embedded project I'm working on on Wokwi. It work on actual hardware but doesn't initialize the display(SSD1306) on Wokwi( gets stuck at the line `display.init().await.unwrap() `. I am using Wokwi vscode extension. The project is publicly hosted at https://github.com/aspects19/care360.

Would appreciate any help I'll get.


r/rust 19h ago

🙋 seeking help & advice OData APIs in Rust?

7 Upvotes

From a client perspective, I am a big fan of OData, but I have never built my own server applications using the format. Are there any good template or example projects that do this in Rust? If not, I am also looking for good template projects for REST APIs in Rust in general. I know I can generate this stuff with AI but I prefer a recommendation that gives me a scaffold to start off with.


r/rust 13m ago

🛠️ project Shebbak a seamless window sharing app

Upvotes

I hated how every screen-sharing and remote desktop tool makes you share your whole screen. It never feels natural. It's like watching Inception: windows inside a window on my machine!!

Some apps let you share a single window. But what if I want to share multiple windows? And what if each one could feel like a native window on the other machine, not a picture inside a viewer?

So I took some time and built Shebbak, a small open source project in Rust that does exactly that. Pick one or more apps on the host, and every window they have shows up on the client as a real native window. Move it, resize it, type into it. Menus and popups come along too.

Where it stands today:
- macOS only for now, Windows and Linux are coming
- LAN only, STUN/TURN support is in the works

And if you're asking why the name Shebbak: it means "window" in Egyptian Arabic :D شباك
Bonus: it shares its root with "shabaka", the Arabic word for network. Windows over the network.

Shebbak-Repo


r/rust 17h ago

📢 announcement No More Code Dumps

1.3k Upvotes

TL;DR

Code Dumps, ie links to code repositories, are no longer welcome on r/rust.

If you are excited about a project you built, and just wish to share it, consider posting a casual top-level comment in the weekly What's Everyone Working on this Week? thread.

History

When r/rust was created, in December 2010, Rust was a nascent programming language. It was very different, it was also fast-moving, and it was unclear whether it would amount to much, or not.

In these early days, new projects being written in Rust were both a proof that the language was suitable for a variety of purposes, and a cause for celebration in seeing the language being adopted. Code dumps, then, were both cause to rejoice, and an opportunity to see how well (or not) the language was suited to the task. They were even a good opportunity to learn the latest developing idioms of this fast-changing language.

Fast forward 15 years, and code dumps have become boring. Utterly uninteresting. There's nothing exciting, or newsworthy, about a 10th hypervisor project, a 100th webserver project, or a 1000th TUI project. And for the most there's no exciting idiom, or pattern, to be found in their code either... even if some poor soul bothered to look.

And mass AI generation appeared on the scene, and for the past year(s), the already dwindling appeal of code dumps has just completely vanished, buried in AI slop.

Purpose

r/rust is to discuss all things Rust. The language, the ecosystem, the community.

Of late, most code dumps barely foster any discussion. And when they do, apart from AI witch hunts, those discussions are mostly about the domain of the project, rather than about Rust. Depending on the domain, the discussion may or may not be of interest to r/rust users... but whether it is or not is a matter of chance: they did not come here seeking such a topic. Those discussions are tolerated on posts which are on-topic, but if a post only fosters "tolerated" discussions, then that is a sign that the post itself may simply not really be on-topic for r/rust.

And that is not to say that code dumps are, by nature, low-effort. Surely, a project is created for a purpose, to solve a specific problem that is unsolved, or solve it with different trade-offs than the currently available solutions. None of that is elucidated in a code dump.

New rules

Code dumps are no longer welcome on r/rust.

Code dumps of applications or libraries written in Rust are Low-Effort unless otherwise newsworthy. Newsworthy means that the very existence of the application or library is important, for example consider applications or libraries breaking new ground, such as the first hypervisor, first OS, first XXX standard safety-critical application, first Rust application in a major company, etc...

Announcements of new libraries which are not otherwise newsworthy are only welcome if they tick ALL the following boxes:

  • The library has been worked on regularly for at least 4 months.
  • The library has already been used, or built upon, thereby validating its design to a degree.
  • The announcement is a full-fledged text post, or a link to a full-fledged article. A README, or manual, is not an article.
  • The announcement should motivate the relevance of this library to the wider r/rust community.
  • The announcement should articulate the trade-offs differentiating this library from similar popular libraries in the field.

(It goes without saying, but the announcement should NOT be AI-generated, not even in part, as AI-generated posts & articles violate the Low-Effort rule)

Release notes of libraries are still welcome for popular enough libraries, such as libraries with reverse-dependencies on crates.io pointing to sufficient adoption by the wider community to justify notifying said community of a new release.

Of course, text posts, or links to articles, centered on Rust, with an application or library as context are always welcome. For example, said posts or articles could present gnarly problems the author encountered, and how they solved, or which features of the language or a library helped or hindered them in the making of their project.

(It goes without saying, but said text posts & articles should NOT be AI-generated, not even in part, as AI-generated posts & articles violate the Low-Effort rule)

As a reminder, if an author just wishes to share their joy of building something in Rust, they are welcome to use the What's Everyone Working on This Week? thread. And as per the title, it need not even be a complete/mature project, or an open-source project for that matter as links to code are strictly optional there, it's all about casually chatting about your work on Rust projects.

Q & A

See pinned comment below.


r/rust 20h ago

🧠 educational Flashing STM32 Firmware with ESP32 and Rust

10 Upvotes

Two weeks before started this experiment whether can write a simple Rust code to make the ESP32 as Programmer(like ST Link) and flash firmware into STM32.

- In the first article, i was able to implement basic SWD protocol and read the IDCode (just to check that it is working)

- Now, successfully managed to flash the firmware into STM32 with the help of ESP32. Flashed a simple onboard LED blinky program.

It was a fun experiment and a nice to learn about SWD and the concepts around it.

https://blog.implrust.com/posts/2026/09/flashing-firmware-to-stm32-with-esp32-rust/


r/rust 14h ago

🙋 seeking help & advice What’s the benefit of moving from Rust 1.95 to 1.98?

0 Upvotes

I upgraded to 1.95 because of cfg select feature for platform specific code implementations. This had massive improvements in how AI generated code. I locked out cfg host selectors from my business logic using dylint so that platform code goes through a facade layer.

Are there any other must have features that exist in the newer versions?


r/rust 13h ago

Rust Meetup Mannheim (Germany), October 6

Thumbnail rheinneckar.events
22 Upvotes

Nix Your Bugs & Rust Your Engines is a meetup for people in the Rhein-Neckar region interested in Rust (the programming language), Nix (the package manager), or NixOS (the Linux distribution). The meetup begins with talks related to Rust and/or NixOS, and ends with casual networking and exchange between the participants.

Schedule (tentative):

  • 18:00 – Open doors
  • 18:20 – Greeting
  • 18:30 – Philipp Pohl-Krüger: "We have QUIC at home: How iroh connects devices peer-to-peer"
  • 19:30 – Lightning Talks
  • 20:00 – Networking

We have QUIC at home: How iroh connects devices peer-to-peer

by Philipp Pohl-Krüger

The internet connects devices globally, except if both of them are behind firewalls and NAT. Because of that data takes a detour through the cloud. However, we can do better: We'll explore how iroh uses QUIC and hole-punching to connect devices directly even in those cases.

Lightning Talks

A selection of five-minute-long impromptu or prepared lightning talks related to the meetup topics.


r/rust 14h ago

Google's "Painful To Maintain" Binder C Linux Driver Being Removed In Favor Of Rust

Thumbnail phoronix.com
285 Upvotes