Rust 1.100.0

(github.com)

254 points | by thesuperbigfrog 1 hour ago

15 comments

  • iknowstuff 1 hour ago
    Better link: https://blog.rust-lang.org/2026/11/12/Rust-1.100.0/

    The blog post summarized the most important changes.

    • n_u 41 minutes 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

    • ustad 28 minutes ago
      “Never type” - Feel like I’m stupid for not having a clue what that means.
      • anamexis 25 minutes ago
      • pkulak 25 minutes ago
        A few other langs have it too. It's just something to return when no return is actually possible. And then it can propagate, so it makes some nice things possible that weren't before.
      • LoganDark 2 minutes ago
        It's the type called "!", or the return value of diverging control flow, such as infinite loops, returns or function calls that panic or abort. It's an uninhabited type, meaning no values can actually exist, and that any code that would encounter such a value is unreachable.
    • entropicdrifter 55 minutes ago
      You are the hero we needed, today. Thank you
    • Kinrany 48 minutes ago
      @dang
      • dwb 41 minutes ago
        This doesn’t do anything.
        • arcanemachiner 0 minutes ago
          This site doesn't even support proper Markdown and people somehow think that Twitter-style username tags will down anything.
        • lukax 11 minutes ago
          Yes, it does. It triggers some people who then post a reply to write an email to hn@ycombinator.com
  • nirinor 1 hour 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

  • ammar_az 29 minutes 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()

    • afdbcreid 19 minutes ago
      They are mentioned in the blog post, under "Stabilized APIs".
  • jadbox 4 minutes 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.
  • ComputerGuru 1 hour ago
    It would probably be better to wait for the official release blog post for submission to HN, no?
  • pmichaud 1 hour ago
    Nice work... but I still yearn for a stable ABI!
    • JoshTriplett 13 minutes ago
      The primary challenge in having a stable ABI is that we have generics. So, even if we never changed the calling conventions, an ABI is not as simple as exporting a symbol with the right name. We implement generics by providing MIR (our main intermediate representation) that gets compiled by the linking program for each instantiation of a generic.

      Swift handles this through the equivalent of Rust's `dyn`. We could have a stable ABI that's based entirely on `dyn`. Such an ABI would have some limitations, since there are traits `dyn` can't represent (anything that's generic over something other than the type that implements the trait, which is quite common), though we're working on some of those.

      Essentially, you wouldn't be able to have a `Vec<T>` in your ABI without either pinning down T or using something like `Vec<Box<dyn Trait>>`. Which is possible, but kind of awful.

      We're still planning to ship a stable ABI at some point, but that gives a flavor for some of the kinds of problems we'd need to solve in order for that stable ABI to be useful.

      (C++ typically handles generics by having types defined in header files, and those get compiled with the program consuming the library, which is effectively the same situation Rust is in. You could export symbols from a shared library for specific instantiation of a template, but people rarely do that.)

    • iknowstuff 1 hour ago
      Follow or contribute to efforts on a minimal crABI:

      https://github.com/joshtriplett/rfcs/blob/crabi-v1/text/3470...

    • orlp 1 hour ago
      We have it: unsafe extern "C" { }.

      An actual stable native Rust ABI sounds like a forward compatibility nightmare.

      • Xirdus 59 minutes ago
        An actual stable native Rust ABI is a prerequisite for distributing libraries as anything other than source code.
        • ChadNauseam 9 minutes ago
          What is the advantage of doing so? Is it for cases where your source code is confidential but you want to sell access to your library?
        • SkiFire13 36 minutes ago
          It's not a strict prerequisite, you can just require the library being distributed to use extern "C".
          • gspr 27 minutes ago
            Well yes, but then your interface is a C ABI. That's fantastic if the side using my library is any language where C is the only common ground. When the application side is Rust though, it leaves a lot to be desired. It would be delicious to actually interface in a way that respects Rust!

            Hell, even if all exposed functions and types would need to be fully monomorphized at the interface, it would be a lot nicer to pass a `&'a [i64]` rather than a `const * int64_t` together with a `size_t n` and have to marshall the slice on both sides.

        • wahern 42 minutes ago
          Another year or three of insane memory and disk prices and people will come around.

          A stable Rust ABI would be nice for not just Rust, especially if they refine or extend (formally or de facto) the SysV ABI to optimize passing and returning of discriminants. That could then smooth the way for developing these features in C and C++, such as a primitive error-result type that saw some brief attention in both C and C++ WGs a couple of years ago. Doing it properly--absolute minimum cost, ABI stable, and cross-language--seemed to require too much orchestration across the ecosystem so enthusiasm and ambition seemed to peter out. The work required for a stable Rust ABI could provide the inertia to get that done.

        • afdbcreid 17 minutes ago
          Rust will almost certainly never have a stable ABI by default, and libraries will continue to be compiled from source by default. It might one day have an opt-in stable ABI.
        • fallingbananna 12 minutes ago
          If you can drop the "native" requirement, then Wasm is also a way.
        • redox99 42 minutes ago
          Why would you want libraries in any other format?
          • eviks 34 minutes ago
            Not to waste time and space?
    • stillpointlab 35 minutes ago
      stable ABI sounds great, but anything/everything that reduces build times is what I really want
    • Svoka 1 hour ago
      Why the yearning for prebuilt Rust libraries? Seems like a nightmare which does not need to happen.
      • Woshiwuja 42 minutes ago
        [dead]
      • silon42 23 minutes ago
        So, all Linux will be Gentoo?
  • steveklabnik 1 hour ago
    A monumental release. Thanks to everyone who worked so hard on all of these long-term features that are finally landing.
  • fluffiac 48 minutes 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?

    • NobodyNada 44 minutes ago
      Those were stabilized in https://github.com/rust-lang/rust/pull/161712, which just barely missed the cutoff date for 1.100 and is on the 1.101 release train.

      (As for why they weren't stabilized at the same time: because it's not worth adding more baggage to a major, difficult stabilization process; as that would just be more surface area that has to be reviewed and another source of potential issues or delays. Instead, the stabilization process for infallible_unwrap was started immediately after `!` was stabilized. That process includes a 2-week final comment period for community feedback which is why they landed in different releases.)

  • karavelov 1 hour ago
    Finally, "never" happened
    • JoshTriplett 21 minutes ago
      And the running joke that the type is named after its stabilization date can finally be put to rest. :)
      • hbn 2 minutes ago
        We got "never" in Rust before GTA6

        Two jokes that are expiring this month

    • jmyeet 49 minutes ago
      One might call this the moment when nothing never occurs [1].

      [1]: https://www.youtube.com/watch?v=RFm9ClqlGuo

  • lukax 1 hour 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

    • weinzierl 39 minutes ago
      "Awesome timing."

      Wait for the timing of the next release. It will be a Christmas present.

  • hobofan 51 minutes ago
    Thanks to all the maintainers and contributors! That's one of the biggest releases in a long time!
    • fock 25 minutes ago
      also humans contributing! Very cool!
  • fallingmeat 1 hour ago
    wait other things not named jensen happened today? whoa
    • nazgulsenpai 1 hour ago
      once outlook broke we can't even share jensen memes
  • theapiartist 1 hour ago
    [dead]
  • KolmogorovComp 11 minutes 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.
  • Surac 36 minutes 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?
    • adamch 33 minutes ago
      because they change the binary layout sometimes, and the benefits have not yet been judged to be worth freezing it.