Rust

7703 readers
45 users here now

Welcome to the Rust community! This is a place to discuss about the Rust programming language.

Wormhole

!performance@programming.dev

Credits

  • The icon is a modified version of the official rust logo (changing the colors to a gradient and black background)

founded 2 years ago
MODERATORS
101
 
 

Hey all, I've been contemplating what approach I should take in my app, think along the lines of mapping with lots of UI elements but also a 2D portal/window for showing the map etc.

I want it to be cross platform so thought I'd go with Egui and look at implementing the "game" parts to that. But as I thought more about it, maybe it would be more beneficial to use Bevy and rely on its UI framework.

Thoughts? Maybe Bevy would be easier, but might be too much of a hit on performance because its not a game that I'm making. Egui might be more difficult to add the game stuff, but more performant and not running a full game engine.

I'm really conflicted. It would be good to be able to turn off/disable the game part of it to reduce load if it isn't needed at the time

102
 
 

I'm impressed with how many great tools have been created in a short period of time. The Rust community really pulled together and made sure that there are Rust alternatives to as many tools out there as possible.

Thank you so much, and keep up with great work!

103
104
 
 

Hello and welcome to another issue of This Week in Rust! Rust is a programming language empowering everyone to build reliable and efficient software. This is a weekly summary of its progress and community. Want something mentioned? Tag us at @thisweekinrust.bsky.social on Bluesky or @ThisWeekinRust on mastodon.social, or send us a pull request. Want to get involved? We love contributions.

This Week in Rust is openly developed on GitHub and archives can be viewed at this-week-in-rust.org. If you find any errors in this week's issue, please submit a PR.

Want TWIR in your inbox? Subscribe here.

105
18
The Handle trait (smallcultfollowing.com)
submitted 3 months ago by SorteKanin@feddit.dk to c/rust@programming.dev
106
 
 

There was recently this article about Linus Torvalds' issues with rustfmt, which prompted others to voice their agreement with his sentiment online.

Yesterday someone pointed out how rustfmt is effectively unmaintained with basically no activity on the repository for months.

The contributors graph shows a similar story - there is essentially no development happening on rustfmt, it seems.

107
108
 
 

cross-posted from: https://programming.dev/post/38555081

I've just finished up version 1.2.2 for Auditorium - a fast local music player powered by Ratatui.

Since my last update, I've added a few new fun features:

  • Optional MPRIS support to allow global access to the underlying music player (pause, play, seek, view album art, and more from your desktop environment!)
  • Album/track sorting based on track number metadata
  • Switched from FfProbe to ID3 crate for huge load time decreases
  • Optional cover art display
  • Made lots of efficiency tweaks to take down CPU usage to < 2% while still running at 60 fps (fast TUI is a good TUI)

Lots of things I still would like to add (and a few issues already underway), so I hope to find time to improve more when I can.

Cheers

109
 
 

Awful Rustdocs is a CLI tool that generates or improves Rustdoc comments by harvesting symbols via rust_ast.nu, enriching each item with ast-grep context (callers, intra-body calls, qualified paths), and prompting your LLM to produce concise, high-quality docs.

You don't need hundreds of prompts and agents if you're smart about your context.

I'm running it on all my Rust projects right now using the Systems Programming Qwen 3 4B finetune I created, and it saves me an incredible amount of time by creating docs that are almost always good enough to publish straight off but act more as a draft for me. It cuts down on a lot of repetitive typing and lets me get back to doing what I love (writing code).

It requires Nushell, but you should probably already be using that, and if this is how you find out about Nushell, then even better, make the jump; it's worth it.

110
 
 

I'm happy to announce the release of diesel-async 0.7. This release makes diesel-async compatible with the recent Diesel 2.3 release. It also contains an easier way to execute migrations and improved ergonomics for using pipelined queries with the PostgreSQL connection type.

I'm happy to answer questions about this release.

111
 
 
112
113
 
 

Hey all, just wondering if there are blogs or podcasts out there that cover common design patterns in Rust. I'm a Java dev and have tried a few times to get into Rust, but it feels like I'm solving problems in a way that aren't the most optimal for Rust because I'm still in that Java mindset.

Anyway I'm working on an XMPP client and my current challenge is working to implement some sort of event/listener system where I can trigger functions when I receive certain XMPP message types.

I put together a simple XML parser to deserialize (haven't done serialisation yet) messages which I can then determine the type of message it is. I was thinking maybe an event driven setup might work best here but not sure where to start in a Rust idiomatic way.

The idea would be we receive a Proceed message for TLS negotiation, this would trigger the tls_upgrade function which itself will send messages and need to react to the response as part of the negotiation step. But, again I'm not sure this would even be the best approach.

What I'm doing now is calling the tls_upgrade function which will do its own handling of sending a negotiation message, then looping on read_line on the stream hoping that the next message is the next needed message in the negotiation process.

So some advice on common patterns used in Rust in blog form or even podcasts would be a good learning resource.

Cheers.

114
 
 

A cloudflare dev answered some questions in the reddit thread: https://www.reddit.com/r/rust/s/1Dm0KmhgzQ

115
116
117
118
119
16
submitted 4 months ago* (last edited 4 months ago) by artiman@piefed.social to c/rust@programming.dev
 
 

Why can't I open the thing it nags me about an operator but how is that relevant I'm just trying to open the thing

120
121
 
 

There has been another major update for Graphite.rs

For those who are not yet familiar with Graphite:

Graphite is a free, open-source editor for vector and raster graphics, currently available in alpha version. Get creative with a fully non-destructive editing workflow that combines layer-based compositing with node-based generative design.

122
123
16
submitted 4 months ago* (last edited 4 months ago) by Starfighter@discuss.tchncs.de to c/rust@programming.dev
 
 

cross-posted from: https://lemmy.ml/post/36210816

asciinema (aka asciinema CLI or asciinema recorder) is a command-line tool for recording and live streaming terminal sessions.

This is a complete rewrite of asciinema in Rust, upgrading the recording file format, introducing terminal live streaming, and bringing numerous improvements across the board.

124
 
 

cross post from: https://programming.dev/post/37369902

Hi everyone,

we, the iceoryx community, just released iceoryx2 v0.7, an ultra-low latency inter-process communication framework for Rust, C, C++ and with this release, Python.

If you are into robotics, embedded real-time systems (especially safety-critical), autonomous vehicles or just want to hack around, iceoryx2 is built with you in mind.

Check out our release announcement for more details: https://ekxide.io/blog/iceoryx2-0-7-release

And the link to the project: https://github.com/eclipse-iceoryx/iceoryx2

125
 
 

I'm happy to announce the release of Diesel 2.3. This release contains various extensions to the query DSL provided by Diesel and enables using Diesel in web browsers via the wasm32-unknown-unknown target.

Checkout the full release announcements for more details.

As always you can support my work on Diesel by contributing or sponsoring the project.

I would like to use this possibility to thank NLNet Foundation for funding the newly added window function extension.

I'm happy to answer any question that comes up.

view more: ‹ prev next ›