54 points mbStavola 2 hours ago 67 comments
ComputerGuru 2 hours ago | parent
qchris 2 hours ago | parent
NobodyNada 2 hours ago | parent
nirinor 2 hours ago | parent
- 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
pmichaud 2 hours ago | parent
orlp 2 hours ago | parent
An actual stable native Rust ABI sounds like a forward compatibility nightmare.
Xirdus 1 hour ago | parent
wahern 1 hour ago | parent
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.
SkiFire13 1 hour ago | parent
gspr 1 hour ago | parent
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.
Xirdus 35 minutes ago | parent
afdbcreid 1 hour ago | parent
fallingbananna 1 hour ago | parent
ChadNauseam 1 hour ago | parent
iknowstuff 1 hour ago | parent
https://github.com/joshtriplett/rfcs/blob/crabi-v1/text/3470...
stillpointlab 1 hour ago | parent
JoshTriplett 1 hour ago | parent
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.)
mamcx 8 minutes ago | parent
Similar to :
#[rust_abi]
struct MustConform
fn must_conform
So the user must write the shims instead of rust magically build it. This also mean that ABI changes become visible, and changes to rust not mean worries about ABI.danhor 24 minutes ago | parent
It might make sense to have a subset Swift-style stable ABI, but that's a huge engineering effort, has lots of overhead and is also likely not worth it IMHO.
lukax 2 hours ago | parent
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.
weinzierl 1 hour ago | parent
Wait for the timing of the next release. It will be a Christmas present.
steveklabnik 1 hour ago | parent
fluffiac 1 hour ago | parent
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 1 hour ago | parent
(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.)
n_u 1 hour ago | parent
> 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
Surac 1 hour ago | parent
adamch 1 hour ago | parent
galangalalgol 17 minutes ago | parent
ammar_az 1 hour ago | parent
- 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 1 hour ago | parent
ustad 1 hour ago | parent
pkulak 1 hour ago | parent
igravious 49 minutes ago | parent
anamexis 1 hour ago | parent
https://blog.rust-lang.org/2026/11/12/Rust-1.100.0/#never-ty...
LoganDark 58 minutes ago | parent
Xirdus 44 minutes ago | parent
Any type (like in TypeScript; Rust doesn't have one) is a set of every possible value; a supertype of all types. Every expression regardless of type can be assigned to a variable of type any.
The opposite is the never type, which is an empty set; no value is of type never. Per set theory, an empty set is a subset of every set, which makes the never type a subtype of all types. An expression of type never can be assigned to every variable regardless of type.
If never type has no values, then how can an expression have never type? Easy: it must never evaluate. Infinite loops, unconditional panics/exceptions, process exit/abort, etc. Also, generics - you can have Vec<!> that's always empty, Result<T,!> that can never be an error, etc.
boston_clone 19 minutes ago | parent
NooneAtAll5 22 minutes ago | parent
KolmogorovComp 1 hour ago | parent
raphlinus 33 minutes ago | parent
By contrast, free software in general, and Rust very much in particular, has cultural norms that things should last a while, rather than immediately being thrown away. I think that's worth preserving.
jadbox 1 hour ago | parent
vlovich123 55 minutes ago | parent
They’re also doing work to reduce the amount of disk space usage (by clearing out unused articacts) and make it easier to maintain.
jtwaleson 6 minutes ago | parent
steveklabnik 55 minutes ago | parent
And the large target directories is also being worked on as well.
throwaway27448 47 minutes ago | parent
epage 45 minutes ago | parent
That said, this release includes some incremental improvements as well as the unused-dependency lint to help reduce wasted work within the ecosystem.
Some changes that have been or are about to be merged for upcoming releases
- We will be reducing the debug info generated for the `dev` profile which reduces build-dir size and speeds up builds. We've split off a `debug` profile for when that is needed.
- Cargo will be deleting the directory rustc writes before each invocation, avoiding the leaking of debug files when split-debug is enabled (default on Mac)
- rlibs for workspace members will no longer be copied from build-dir to target-dir which takes up extra space on systems without hardlinking or where we skip it (like Mac)
- redundant information in rlibs and rmeta's is going to be de-duplicated
Examples of further out changes
- This release includes the foundational work to add a build-dir GC
- Cross-workspace de-duplicating of build-dirs
- Cross-workspace build-dir cache
- Early cut off
small_model 14 minutes ago | parent
amelius 11 minutes ago | parent
0o777 4 minutes ago | parent
grommz 7 minutes ago | parent