this post was submitted on 20 Feb 2025
87 points (100.0% liked)

Rust

6637 readers
207 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
top 3 comments
sorted by: hot top controversial new old
[–] calcopiritus@lemmy.world 5 points 1 month ago

The const hash map is huge. It was always a pain the have const/static hash maps. Specially since most use cases don't need a DoS-resistant hash map. Will be migrating to 2024 as soon as possible.

[–] sugar_in_your_tea@sh.itjust.works 5 points 1 month ago* (last edited 1 month ago) (1 children)

Adds Future and IntoFuture to the prelude.

Woo!

std::env::set_var, std::env::remove_var... are now unsafe functions.

That's unfortunate. I understand why it's unsafe, but it would be cool if they were atomic or something instead. I don't really want to clutter code with unsafe for things that are technically safe in context (e.g. unit tests for config parsing).

async closures

Baller.

Other cool stuff as usual, so I'll be updating soon. Congrats on the release!

Edit: Looks like they messed with default lifetimes on impl Trait, but the fix was easy enough. The upgrade was otherwise smooth. Good work!

[–] BatmanAoD@programming.dev 2 points 4 weeks ago

They did consider making environment-manipulation functions atomic; the problem is that there's simply no way to guarantee that everything that can manipulate your process's environment is actually beholden to whatever atomic interface Rust provides. I could be misremembering, but I think there was even some discussion with glibc maintainers about whether this could be made safe, and the answer was basically "haha no."