Hacker news

  • Top
  • New
  • Past
  • Ask
  • Show
  • Jobs

Rust 1.100 (https://blog.rust-lang.org)

905 points by mbStavola 8 days ago | 321 comments | View on ycombinator

nirinor 8 days ago |

Woohoo, that's a release! My personal favorites:

- Stabilize never type

- Stabilize custom allocators

- Introduced minimum publish age configurations, also known as dependency cooldowns. When the relevant config is set, the resolver ignores versions published more recently than that, unless they are already in Cargo.lock. (RFC 3923) docs #17335

- cargo-install: now uses the existing lockfile in the .crate tarball by default. --locked in cargo install becomes a no-op. #17388

n_u 8 days ago |

> Cargo now reports unused dependencies to users, e.g.

> warning: unused dependency `tracing-subscriber` --> Cargo.toml:23:1 | 23 | tracing-subscriber.workspace = true | ^^^^^^^^^^^^^^^^^^ | = note: `cargo::unused_dependencies` is set to `warn` by default help: consider removing the dependency on `tracing-subscriber`

Heck yes

ammar_az 8 days ago |

This release is so big that multiple useful stabilized API aren't event mentioned in the blog post like:

- bool::toggle() https://doc.rust-lang.org/stable/std/primitive.bool.html#met...

- Box::map() https://doc.rust-lang.org/stable/std/boxed/struct.Box.html#m...

- str::trim_prefix(), str::trim_suffix, Path::trim_prefix()

jadbox 8 days ago |

Is the compiler any faster now? Compiling takes forever. I'm also tired of always having to do "cargo clean" everyday to clear out 90gb of temp files.

steveklabnik 8 days ago |

A monumental release. Thanks to everyone who worked so hard on all of these long-term features that are finally landing.

ashvardanian 7 days ago |

This is by far my most long-awaited Rust release! The kind of “memory safety” I fight with most in Systems Programming isn’t use-after-free, but keeping things running under memory starvation. Having standard containers abort on allocation failure always seemed wrong to me, especially in an ecosystem that got so many other things right!

Huge thanks to everyone making this happen! I’ve only been on the consuming end so far, but hopefully I’ll find something useful to contribute myself. Pointer provenance might be a nice next challenge :)

ComputerGuru 8 days ago |

It would probably be better to wait for the official release blog post for submission to HN, no?

levkk 7 days ago |

DropGuard is nice. This is basically `defer` in Go I think.

ustad 8 days ago |

“Never type” - Feel like I’m stupid for not having a clue what that means.

pmichaud 8 days ago |

Nice work... but I still yearn for a stable ABI!

mkl 7 days ago |

> cargo install ignores the minimum publish age, for both the installed crate and its dependencies

Why is that? It seems like that makes min-publish-age much less effective.

fluffiac 8 days ago |

yay never type!!

when can we expect `Result::into_ok` and `Result::into_err` to land? the blog post includes the `infallible_unwrap` demo which is the exact functionality these two functions implement. i wonder why they didn't release these at the same time as never?

nbardy 7 days ago |

Can anyone who knows Rust well explain why its so good for AI?

It seems like the AI can really write safe types and fast, efficient code in rust that beats anything else.

I've moved basically all my projects over to it. And I don't really know how it compares to other fast languages. My personal langue preference was always for readable languages like Clojure or Ruby, but at this point I'm not reading any code and just want performance.

uncivilized 7 days ago |

The blog post says min-publish-age depends on the registry recording a pubtime. Why would pubtime not exist in the index?

esFran 7 days ago |

I've been thinking for a while about learning a programming language other than SQL and Python. I'm weighing three candidates: C, C++ (modern C++, with smart pointers and so on) or Rust, and I can't make up my mind. C is ideal because it would get me into the Linux world and make me 100% portable. But the threat Rust poses on the security front is significant. C++ is a real dark horse: almost all high-performance libraries are written in C++, as are critical pieces of software such as 3D engines, drone controllers and robotics. But the threat from Rust is still felt.

I have to choose: what would you recommend? I think C++ could be the perfect fit, but it keeps me out of Linux kernel development. With LLMs, is the safety advantage of Rust's borrow checker mitigated?

lukax 8 days ago |

Awesome timing.

I just spent last few days fixing arena leaks (Bumpalo doesn't call drop) and had to use allocator-api2 for Vec::new_in which is now available in stable Rust.

https://github.com/bancek/rust-sass/pull/1

einpoklum 7 days ago |

Would you say that having 100 releases of the language more of a positive thing or a negative thing?

For comparison, C has had, say, 4 versions, and C++ 7 had versions (depending on how you count). But - Java has had 27 main versions and probably more than a 100 if you count minor versions/updates.

AndruLuvisi 7 days ago |

I can't find any mention of become. Does rust have proper tail calls now?

wpollock 8 days ago |

This is great news! Well done Rust team!

As this release seems to include breaking changes, shouldn't the major version number have been bumped, as per semver?

Has the Rust book(s) been updated to include the new APIs?

Panzerschrek 7 days ago |

> global-min-publish-age = "3 days"

It's not a proper solution. A malicious crate can just contain a time-based switching mechanism in order to be undetected some time (let's say a couple of months) in order to become widespread.

superlupo 7 days ago |

Why not finally a 2.0 if there's a breaking change in it? Or is versioning merely covered by "yearly editions"?

karavelov 8 days ago |

Finally, "never" happened

shevy-java 8 days ago |

> The never type, spelled ! in code

Is that the raven that says Ni?

https://www.youtube.com/watch?v=bLiXjaPqSyY

Alien1Being 7 days ago |

The elephant in the room question is:

Is this good for AI vibecoding ?

Human intelligibility and coherence does not seem to matter any more, for current software development.

hobofan 8 days ago |

Thanks to all the maintainers and contributors! That's one of the biggest releases in a long time!

jokoon 7 days ago |

is rust actually starting to to gain some territory over C++, or still not?

sawirricardo 7 days ago |

i wish for small storage and short duration compilation times

kinfish 7 days ago |

looks g. but not sure if this consists an improvements on compile-time resource like space and time.

unvalley 7 days ago |

welcome min-publish-age

badmonster0 7 days ago |

excited for this

dharmasthan 7 days ago |

[flagged]

AtreusS 7 days ago |

[dead]

yoy0721 7 days ago |

[flagged]

joshsyn 7 days ago |

[dead]

joshsyn 7 days ago |

[dead]

theapiartist 8 days ago |

[dead]

Surac 8 days ago |

Still non ABI. Why is ist so hard? what is holding them back. Andy why does it need a unsave keyword? can't they marshal types like other languages?

KolmogorovComp 8 days ago |

I haven’t seen any blog on the topic but I fully believe in the age of coding agents and LLM backward compatibility is a bit less important than it has been in the past and should be relaxed in some cases to allow language to move faster.

Sol- 7 days ago |

Do language features still matter except insofar as they make the LLM verification loop better?

129486799 7 days ago |

[flagged]

grommz 8 days ago |

[flagged]

fallingmeat 8 days ago |

[flagged]