A language empowering everyone to build reliable and efficient software

Rust for Mac

Join our mailing list

Stay up to date with latest software releases, news, software discounts, deals and more.

Subscribe
Download Rust 1.76.0

Rust for Mac

  -  213 MB  -  Open Source
Rust for Mac is blazingly fast and memory-efficient: with no runtime or garbage collector, it can power performance-critical services, run on embedded devices, and easily integrate with other languages.

Rust for macOS’s rich type system and ownership model guarantee memory-safety and thread-safety — and enable you to eliminate many classes of bugs at compile-time.

It has great documentation, a friendly compiler with useful error messages, and top-notch tooling — an integrated package manager and build tool, smart multi-editor support with auto-completion and type inspections, an auto-formatter, and more.

In 2018, the community decided to improve the programming experience for a few distinct domains (see the 2018 roadmap). For these, you can find many high-quality crates and some awesome guides on how to get started.

Command Line
Whip up a CLI tool quickly with Rust’s robust ecosystem. It helps you maintain your app with confidence and distribute it with ease.

WebAssembly
Use Rust to supercharge your JavaScript, one module at a time. Publish to npm, bundled with webpack, and you’re off to the races.

Networking
Predictable performance. Tiny resource footprint. Rock-solid reliability. Rust is great for network services.

Embedded
Targeting low-resource devices? Need low-level control without giving up high-level conveniences? It has you covered.

Hundreds of companies around the world are using Rust for macOS in production today for fast, low-resource, cross-platform solutions. The software you know and love, like Firefox, Dropbox, and Cloudflare, uses the app. From startups to large corporations, from embedded devices to scalable web services, Rust is a great fit.

Also Available: Download Rust for Windows

  • Rust 1.76.0 Screenshots

    The images below have been resized. Click on them to view the screenshots in full size.

What's new in this version:

Rust 1.76.0
Language:
- Document Rust ABI compatibility between various types
- Also: guarantee that char and u32 are ABI-compatible
- Warn against ambiguous wide pointer comparisons
- Add lint ambiguous_wide_pointer_comparisons that supersedes clippy::vtable_address_comparisons

Compiler:
- Lint pinned #[must_use] pointers (in particular, Box where T is #[must_use]) in unused_must_use
- Soundness fix: fix computing the offset of an unsized field in a packed struct
- Soundness fix: fix dynamic size/align computation logic for packed types with dyn Trait tail
- Add $message_type field to distinguish json diagnostic outputs
- Enable Rust to use the EHCont security feature of Windows
- Add tier 3 {x86_64,i686}-win7-windows-msvc targets
- Add tier 3 aarch64-apple-watchos target
- Add tier 3 arm64e-apple-ios & arm64e-apple-darwin targets
- Refer to Rust's platform support page for more information on Rust's tiered platform support.

Libraries:
- Add a column number to dbg!()
- Add std::hash::{DefaultHasher, RandomState} exports
- Fix rounding issue with exponents in fmt
- Add T: ?Sized to RwLockReadGuard and RwLockWriteGuard's Debug impls
- Windows: Allow File::create to work on hidden files

Stabilized APIs:
- Arc::unwrap_or_clone
- Rc::unwrap_or_clone
- Result::inspect
- Result::inspect_err
- Option::inspect
- type_name_of_val
- std::hash::{DefaultHasher, RandomState} These were previously available only through std::collections::hash_map.
- ptr::{from_ref, from_mut}
- ptr::addr_eq

Rustdoc:
- Don't merge cfg and doc(cfg) attributes for re-exports
- rustdoc: allow resizing the sidebar / hiding the top bar
- rustdoc-search: add support for traits and associated types
- rustdoc: Add highlighting for comments in items declaration

Compatibility Notes:
- Add allow-by-default lint for unit bindings This is expected to be upgraded to a warning by default in a future Rust release. Some macros emit bindings with type () with user-provided spans, which means that this lint will warn for user code.
- Remove x86_64-sun-solaris target
- Remove asmjs-unknown-emscripten target
- Report errors in jobserver inherited through environment variables This may warn on benign problems too
- Update the minimum external LLVM to 16
- Improve print_tts This change can break some naive manual parsing of token trees in proc macro code which expect a particular structure after .to_string(), rather than just arbitrary Rust code
- Make IMPLIED_BOUNDS_ENTAILMENT into a hard error from a lint
- Vec's allocation behavior was changed when collecting some iterators Allocation behavior is currently not specified, nevertheless changes can be surprising. See impl FromIterator for Vec for more details.
- Properly reject default on free const items


Rust 1.75.0
Language:
- Stabilize async fn and return-position impl Trait in traits
- Allow function pointer signatures containing &mut T in const contexts
- Match usize/isize exhaustively with half-open ranges
- Guarantee that char has the same size and alignment as u32
- Document that the null pointer has the 0 address
- Allow partially moved values in match
- Add notes about non-compliant FP behavior on 32bit x86 targets
- Stabilize ratified RISC-V target features

Compiler:
- Rework negative coherence to properly consider impls that only partly overlap
- Bump COINDUCTIVE_OVERLAP_IN_COHERENCE to deny, and warn in dependencies
- Consider alias bounds when computing liveness in NLL
- Add the V (vector) extension to the riscv64-linux-android target spec
- Automatically enable cross-crate inlining for small functions

Add several new tier 3 targets:
- csky-unknown-linux-gnuabiv2hf
- i586-unknown-netbsd
- mipsel-unknown-netbsd

Libraries:
- Override Waker::clone_from to avoid cloning Wakers unnecessarily
- Implement BufRead for VecDeque
- Implement FusedIterator for DecodeUtf16 when the inner iterator does
- Implement Not, Bit{And,Or}{,Assign} for IP addresses
- Implement Default for ExitCode
- Guarantee representation of None in NPO
- Document when atomic loads are guaranteed read-only
- Broaden the consequences of recursive TLS initialization
- Windows: Support sub-millisecond sleep
- Fix generic bound of str::SplitInclusive's DoubleEndedIterator impl
- Fix exit status / wait status on non-Unix cfg(unix) platforms

Stabilized APIs:
- Atomic*::from_ptr
- FileTimes
- FileTimesExt
- File::set_modified
- File::set_times
- IpAddr::to_canonical
- Ipv6Addr::to_canonical
- Option::as_slice
- Option::as_mut_slice
- pointer::byte_add
- pointer::byte_offset
- pointer::byte_offset_from
- pointer::byte_sub
- pointer::wrapping_byte_add
- pointer::wrapping_byte_offset
- pointer::wrapping_byte_sub
- These APIs are now stable in const contexts:
- Ipv6Addr::to_ipv4_mapped
- MaybeUninit::assume_init_read
- MaybeUninit::zeroed
- mem::discriminant
- mem::zeroed

Cargo:
- Add new packages to [workspace.members] automatically
- Allow version-less Cargo.toml manifests
- Make browser links out of HTML file paths

Rustdoc:
- Accept less invalid Rust in rustdoc
- Document lack of object safety on affected traits
- Hide #[repr(transparent)] if it isn't part of the public ABI
- Show enum discriminant if it is a C-like variant

Compatibility Notes:
- FreeBSD targets now require at least version 12
- Formally demote tier 2 MIPS targets to tier 3
- Make misalignment a hard error in const contexts
- Fix detecting references to packed unsized fields
- Remove support for compiler plugins

Internal Changes:
- These changes do not affect any public interfaces of Rust, but they represent significant improvements to the performance or internals of rustc and related tools
- Optimize librustc_driver.so with BOLT
- Enable parallel rustc front end in dev and nightly builds
- Distribute rustc-codegen-cranelift as rustup component on the nightly channel


Rust 1.73.0
Language:
- Uplift clippy::fn_null_check lint as useless_ptr_null_checks
- Make noop_method_call warn by default
- Support interpolated block for try and async in macros
- Make unconditional_recursion lint detect recursive drops
- Future compatibility warning for some impls being incorrectly considered not overlapping
- The invalid_reference_casting lint is now deny-by-default (instead of allow-by-default)

Compiler:
- Write version information in a .comment section like GCC/Clang
- Add documentation on v0 symbol mangling
- Stabilize extern "thiscall" and "thiscall-unwind" ABIs
- Only check outlives goals on impl compared to trait
- Infer type in irrefutable slice patterns with fixed length as array
- Discard default auto trait impls if explicit ones exist

Add several new tier 3 targets:
- aarch64-unknown-teeos
- csky-unknown-linux-gnuabiv2
- riscv64-linux-android
- riscv64gc-unknown-hermit
- x86_64-unikraft-linux-musl
- x86_64-unknown-linux-ohos
- Add wasm32-wasi-preview1-threads as a tier 2 target
- Refer to Rust's platform support page for more information on Rust's tiered platform support

Libraries:
- Add Read, Write and Seek impls for Arc
- Merge functionality of io::Sink into io::Empty
- Implement RefUnwindSafe for Backtrace
- Make ExitStatus implement Default
- impl SliceIndex for (Bound, Bound)
- Change default panic handler message format.
- Cleaner assert_eq! & assert_ne! panic messages.
- Correct the (deprecated) Android stat struct definitions.

Stabilized APIs:
- Unsigned {integer}::div_ceil
- Unsigned {integer}::next_multiple_of
- Unsigned {integer}::checked_next_multiple_of
- std::ffi::FromBytesUntilNulError
- std::os::unix::fs::chown
- std::os::unix::fs::fchown
- std::os::unix::fs::lchown
- LocalKey::::get
- LocalKey::::set
- LocalKey::::take
- LocalKey::::replace
- LocalKey::::with_borrow
- LocalKey::::with_borrow_mut
- LocalKey::::set
- LocalKey::::take
- LocalKey::::replace
- These APIs are now stable in const contexts:
- rc::Weak::new
- sync::Weak::new
- NonNull::as_ref

Cargo:
- Encode URL params correctly for SourceId in Cargo.lock
- Bail out an error when using cargo:: in custom build script

Misc:
Compatibility Notes:
- Update the minimum external LLVM to 15
- Check for non-defining uses of return position impl Trait

Internal Changes:
- These changes do not affect any public interfaces of Rust, but they represent significant improvements to the performance or internals of rustc and related tools
- Remove LLVM pointee types, supporting only opaque pointers
- Port PGO/LTO/BOLT optimized build pipeline to Rust
- Replace in-tree rustc_apfloat with the new version of the crate
- Update to LLVM 17
- Add internal_features lint for internal unstable features
- Mention style for new syntax in tracking issue template


Rust 1.72.0
Language:
- Replace const eval limit by a lint and add an exponential backoff warning
- expand: Change how
- Stabilize inline asm for LoongArch64
- Uplift clippy::undropped_manually_drops lint
- Uplift clippy::invalid_utf8_in_unchecked lint
- Uplift clippy::cast_ref_to_mut lint
- Uplift clippy::cmp_nan lint
- resolve: Remove artificial import ambiguity errors
- Don't require associated types with Self: Sized bounds in dyn Trait objects

Compiler:
- Remember names of cfg-ed out items to mention them in diagnostics
- Support for native WASM exceptions
- Add support for NetBSD/aarch64-be (big-endian arm64)
- Write to stdout if - is given as output file
- Force all native libraries to be statically linked when linking a static binary
- Add Tier 3 support for loongarch64-unknown-none*
- Prevent .eh_frame from being emitted for -C panic=abort
- Support 128-bit enum variant in debuginfo codegen
- compiler: update solaris/illumos to enable tsan support
- Refer to Rust's platform support page for more information on Rust's tiered platform support

Libraries:
- Document memory orderings of thread::{park, unpark}
- io: soften ‘at most one write attempt’ requirement in io::Write::write
- Specify behavior of HashSet::insert
- Relax implicit T: Sized bounds on BufReader, BufWriter and LineWriter
- Update runtime guarantee for select_nth_unstable
- Return Ok on kill if process has already exited
- Implement PartialOrd for Vecs over different allocators
- Use 128 bits for TypeId hash
- Don't drain-on-drop in DrainFilter impls of various collections
- Make {Arc,Rc,Weak}::ptr_eq ignore pointer metadata

Rustdoc:
- Allow whitespace as path separator like double colon
- Add search result item types after their name
- Search for slices and arrays by type with []
- Clean up type unification and "unboxing"

Stabilized APIs:
- impl Sync for mpsc::Sender
- impl TryFrom<&OsStr> for &str
- String::leak

These APIs are now stable in const contexts:
- CStr::from_bytes_with_nul
- CStr::to_bytes
- CStr::to_bytes_with_nul
- CStr::to_str

Cargo:
- Enable -Zdoctest-in-workspace by default. When running each documentation test, the working directory is set to the root directory of the package the test belongs to. docs
- Add support of the "default" keyword to reset previously set build.jobs parallelism back to the default

Compatibility Notes:
- Alter Display for Ipv6Addr for IPv4-compatible addresses
- Cargo changed feature name validation check to a hard error. The warning was added in Rust 1.49. These extended characters aren't allowed on crates.io, so this should only impact users of other registries, or people who don't publish to a registry


Rust 1.71.1
Fixed:
- Cargo did not respect the umask when extracting dependencies
- Fix bash completion for users of Rustup
- Do not show suspicious_double_ref_op lint when calling borrow()
- Fix ICE: substitute types before checking inlining compatibility
- Fix ICE: don't use can_eq in derive(..) suggestion for missing method
- Fix building Rust 1.71.0 from the source tarball


Rust 1.70.0
Language:
- Relax ordering rules for asm! operands
- Properly allow macro expanded format_args invocations to uses captures
- Lint ambiguous glob re-exports
- Perform const and unsafe checking for expressions in let _ = expr position

Compiler:
- Extend -Cdebuginfo with new options and named aliases This provides a smaller version of debuginfo for cases that only need line number information (-Cdebuginfo=line-tables-only), which may eventually become the default for -Cdebuginfo=1.
- Make unused_allocation lint against Box::new too
- Detect uninhabited types early in const eval
- Switch to LLD as default linker for {arm,thumb}v4t-none-eabi
- Add tier 3 target loongarch64-unknown-linux-gnu
- Add tier 3 target for i586-pc-nto-qnx700 (QNX Neutrino RTOS, version 7.0),
- Insert alignment checks for pointer dereferences as debug assertions This catches undefined behavior at runtime, and may cause existing code to fail
- Refer to Rust's platform support page for more information on Rust's tiered platform support

Libraries:
- Document NonZeroXxx layout guarantees
- Windows: make Command prefer non-verbatim paths
- Implement Default for some alloc/core iterators
- Fix handling of trailing bare CR in str::lines
- allow negative numeric literals in concat!
- Add documentation about the memory layout of Cell
- Use partial_cmp to implement tuple lt/le/ge/gt
- Stabilize atomic_as_ptr
- Stabilize nonnull_slice_from_raw_parts
- Partial stabilization of once_cell
- Stabilize nonzero_min_max
- Flatten/inline format_args!() and (string and int) literal arguments into format_args!()
- Stabilize movbe target feature
- don't splice from files into pipes in io::copy
- Add a builtin unstable FnPtr trait that is implemented for all function pointers This extends Debug, Pointer, Hash, PartialEq, Eq, PartialOrd, and Ord implementations for function pointers with all ABIs.

Stabilized APIs:
- NonZero*::MIN/MAX
- BinaryHeap::retain
- Default for std::collections::binary_heap::IntoIter
- Default for std::collections::btree_map::{IntoIter, Iter, IterMut}
- Default for std::collections::btree_map::{IntoKeys, Keys}
- Default for std::collections::btree_map::{IntoValues, Values}
- Default for std::collections::btree_map::Range
- Default for std::collections::btree_set::{IntoIter, Iter}
- Default for std::collections::btree_set::Range
- Default for std::collections::linked_list::{IntoIter, Iter, IterMut}
- Default for std::vec::IntoIter
- Default for std::iter::Chain
- Default for std::iter::Cloned
- Default for std::iter::Copied
- Default for std::iter::Enumerate
- Default for std::iter::Flatten
- Default for std::iter::Fuse
- Default for std::iter::Rev
- Default for std::slice::Iter
- Default for std::slice::IterMut
- Rc::into_inner
- Arc::into_inner
- std::cell::OnceCell
- Option::is_some_and
- NonNull::slice_from_raw_parts
- Result::is_ok_and
- Result::is_err_and
- std::sync::atomic::Atomic*::as_ptr
- std::io::IsTerminal
- std::os::linux::net::SocketAddrExt
- std::os::unix::net::UnixDatagram::bind_addr
- std::os::unix::net::UnixDatagram::connect_addr
- std::os::unix::net::UnixDatagram::send_to_addr
- std::os::unix::net::UnixListener::bind_addr
- std::path::Path::as_mut_os_str
- std::sync::OnceLock

Cargo:
- Add CARGO_PKG_README
- Make sparse the default protocol for crates.io
- Accurately show status when downgrading dependencies
- Use registry.default for login/logout
- Stabilize cargo logout

Misc:
- Stabilize rustdoc --test-run-directory

Compatibility Notes:
- Prevent stable libtest from supporting -Zunstable-options
- Perform const and unsafe checking for expressions in let _ = expr position
- WebAssembly targets enable sign-ext and mutable-globals features in codegen This may cause incompatibility with older execution environments
- Insert alignment checks for pointer dereferences as debug assertions This catches undefined behavior at runtime, and may cause existing code to fail

Internal Changes:
- These changes do not affect any public interfaces of Rust, but they represent significant improvements to the performance or internals of rustc and related tools
- Upgrade to LLVM 16
- Use SipHash-1-3 instead of SipHash-2-4 for StableHasher


Rust 1.69.0
Language:
- Deriving built-in traits on packed structs works with Copy fields
- Stabilize the cmpxchg16b target feature on x86 and x86_64
- Improve analysis of trait bounds for associated types
- Allow associated types to be used as union fields
- Allow Self: Autotrait bounds on dyn-safe trait methods
- Treat str as containing [u8] for auto trait purposes

Compiler:
- Upgrade *-pc-windows-gnu on CI to mingw-w64 v10 and GCC 12.2
- Rework min_choice algorithm of member constraints
- Support true and false as boolean flags in compiler arguments
- Default repr(C) enums to c_int size

Libraries:
- Implement the unstable DispatchFromDyn for cell types, allowing downstream experimentation with custom method receivers
- Document that fmt::Arguments::as_str() may return Some(_) in more cases after optimization, subject to change
- Implement AsFd and AsRawFd for Rc

Stabilized APIs:
- CStr::from_bytes_until_nul
- Core::ffi::FromBytesUntilNulError
- These APIs are now stable in const contexts:
- SocketAddr::new
- SocketAddr::ip
- SocketAddr::port
- SocketAddr::is_ipv4
- SocketAddr::is_ipv6
- SocketAddrV4::new
- SocketAddrV4::ip
- SocketAddrV4::port
- SocketAddrV6::new
- SocketAddrV6::ip
- SocketAddrV6::port
- SocketAddrV6::flowinfo
- SocketAddrV6::scope_id

Cargo:
- Cargo now suggests cargo fix or cargo clippy --fix when compilation warnings are auto-fixable
- Cargo now suggests cargo add if you try to install a library crate
- Cargo now sets the CARGO_BIN_NAME environment variable also for binary examples

Rustdoc:
- Vertically compact trait bound formatting
- Only include stable lints in rustdoc::all group
- Compute maximum Levenshtein distance based on the query
- Remove inconsistently-present sidebar tooltips
- Search by macro when query ends with !

Compatibility Notes:
- The rust-analysis component from rustup now only contains a warning placeholder. This was primarily intended for RLS, and the corresponding -Zsave-analysis flag has been removed from the compiler as well.
- Unaligned references to packed fields are now a hard error. This has been a warning since 1.53, and denied by default with a future-compatibility warning since 1.62.
- Update the minimum external LLVM to 14
- Cargo now emits errors on invalid characters in a registry token
- When default-features is set to false of a workspace dependency, and an inherited dependency of a member has default-features = true, Cargo will enable default features of that dependency.
- Cargo denies CARGO_HOME in the [env] configuration table. Cargo itself doesn't pick up this value, but recursive calls to cargo would, which was not intended.
- Debuginfo for build dependencies is now off if not explicitly set. This is expected to improve the overall build time.

Internal Changes:
- These changes do not affect any public interfaces of Rust, but they represent significant improvements to the performance or internals of rustc and related tools.
- Move format_args!() into AST (and expand it during AST lowering)


Rust 1.68.2
- Update the GitHub RSA host key bundled within Cargo. The key was rotated by GitHub on 2023-03-24 after the old one leaked.
- Mark the old GitHub RSA host key as revoked. This will prevent Cargo from accepting the leaked key even when trusted by the system.
- Add support for @revoked and a better error message for @cert-authority in Cargo's SSH host key verification


Rust 1.68.0
Language:
- Stabilize default_alloc_error_handler This allows usage of alloc on stable without requiring the definition of a handler for allocation failure. Defining custom handlers is still unstable.
- Stabilize efiapi calling convention
- Remove implicit promotion for types with drop glue

Compiler:
- Change bindings_with_variant_name to deny-by-default
- Allow .. to be parsed as let initializer
- Add armv7-sony-vita-newlibeabihf as a tier 3 target
- Always check alignment during compile-time const evaluation
- Disable "split dwarf inlining" by default
- Add vendor to Fuchsia's target triple
- Enable sanitizers for s390x-linux

Libraries:
- Loosen the bound on the Debug implementation of Weak.
- Make std::task::Context !Send and !Sync
- PhantomData layout guarantees
- Don't derive Debug for OnceWith & RepeatWith
- Implement DerefMut for PathBuf
- Add O(1) Vec -> VecDeque conversion guarantee
- Leak amplification for peek_mut() to ensure BinaryHeap's invariant is always met

Stabilized APIs:
- {core,std}::pin::pin!
- impl From for {f32,f64}
- std::path::MAIN_SEPARATOR_STR
- impl DerefMut for PathBuf

These APIs are now stable in const contexts:
- VecDeque::new

Cargo:
- Stabilize sparse registry support for crates.io
- cargo build --verbose tells you more about why it recompiles
- Show progress of crates.io index update even net.git-fetch-with-cli option enabled

Misc:
- Compatibility Notes:
- Add SEMICOLON_IN_EXPRESSIONS_FROM_MACROS to future-incompat report
- Only specify --target by default for -Zgcc-ld=lld on wasm
- Bump IMPLIED_BOUNDS_ENTAILMENT to Deny + ReportNow
- std::task::Context no longer implements Send and Sync

Internal Changes:
- These changes do not affect any public interfaces of Rust, but they represent significant improvements to the performance or internals of rustc and related tools.
- Encode spans relative to the enclosing item
- Don't normalize in AstConv
- Find the right lower bound region in the scenario of partial order relations
- Fix impl block in const expr
- Check ADT fields for copy implementations considering regions
- rustdoc: simplify JS search routine by not messing with lev distance
- Enable ThinLTO for rustc on x86_64-pc-windows-msvc
- Enable ThinLTO for rustc on x86_64-apple-darwin


Rust 1.66.1
- Fixes Cargo not verifying SSH host keys when cloning dependencies or registry indexes with SSH


Rust 1.66.0
Language:
- Permit specifying explicit discriminants on all repr(Int) enums
- Allow transmutes between the same type differing only in lifetimes
- Change constant evaluation errors from a deny-by-default lint to a hard error
- Trigger must_use on impl Trait for supertraits This makes impl ExactSizeIterator respect the existing #[must_use] annotation on Iterator
- Allow ..=X in patterns
- Uplift clippy::for_loops_over_fallibles lint into rustc
- Stabilize sym operands in inline assembly
- Update to Unicode 15
- Opaque types no longer imply lifetime bounds This is a soundness fix which may break code that was erroneously relying on this behavior

Compiler:
- Add armv5te-none-eabi and thumbv5te-none-eabi tier 3 targets
- Refer to Rust's platform support page for more information on Rust's tiered platform support
- Add support for linking against macOS universal libraries

Libraries:
- Fix #[derive(Default)] on a generic #[default] enum adding unnecessary Default bounds
- Update to Unicode 15

Stabilized APIs:
- proc_macro::Span::source_text
- uX::{checked_add_signed, overflowing_add_signed, saturating_add_signed, wrapping_add_signed}
- iX::{checked_add_unsigned, overflowing_add_unsigned, saturating_add_unsigned, wrapping_add_unsigned}
- iX::{checked_sub_unsigned, overflowing_sub_unsigned, saturating_sub_unsigned, wrapping_sub_unsigned}
- BTreeSet::{first, last, pop_first, pop_last}
- BTreeMap::{first_key_value, last_key_value, first_entry, last_entry, pop_first, pop_last}
- Add AsFd implementations for stdio lock types on WASI.
- impl TryFrom for Box
- core::hint::black_box
- Duration::try_from_secs_{f32,f64}
- Option::unzip
- std::os::fd

Rustdoc:
- Add Rustdoc warning for invalid HTML tags in the documentation

Cargo:
- Added cargo remove to remove dependencies from Cargo.toml
- cargo publish now waits for the new version to be downloadable before exiting
- Compatibility Notes:
- Only apply ProceduralMasquerade hack to older versions of rental
- Don't export __heap_base and __data_end on wasm32-wasi
- Don't export __wasm_init_memory on WebAssembly
- Only export __tls_* on wasm32-unknown-unknown
- Don't link to libresolv in libstd on Darwin
- Update libstd's libc to 0.2.135 (to make libstd no longer pull in libiconv.dylib on Darwin)
- Opaque types no longer imply lifetime bounds This is a soundness fix which may break code that was erroneously relying on this behavior.
- Make order_dependent_trait_objects show up in future-breakage reports
- Change std::process::Command spawning to default to inheriting the parent's signal mask

Internal Changes:
- These changes do not affect any public interfaces of Rust, but they represent significant improvements to the performance or internals of rustc and related tools.
- Enable BOLT for LLVM compilation
- Enable LTO for rustc_driver.so


Rust 1.65.0
Language:
- Error on as casts of enums with #[non_exhaustive] variants
- Stabilize let else
- Stabilize generic associated types (GATs)
- Add lints let_underscore_drop and let_underscore_lock from Clippy
- Stabilize breaking from arbitrary labeled blocks ("label-break-value")
- Uninitialized integers, floats, and raw pointers are now considered immediate UB. Usage of MaybeUninit is the correct way to work with uninitialized memory.
- Stabilize raw-dylib for Windows x86_64, aarch64, and thumbv7a
- Do not allow Drop impl on foreign ADTs

Compiler:
- Stabilize -Csplit-debuginfo on Linux
- Use niche-filling optimization even when multiple variants have data
- Associated type projections are now verified to be well-formed prior to resolving the underlying type
- Stringify non-shorthand visibility correctly
- Normalize struct field types when unsizing
- Update to LLVM 15
- Fix aarch64 call abi to correctly zeroext when needed
- debuginfo: Generalize C++-like encoding for enums
- Add special_module_name lint
- Add support for generating unique profraw files by default when using -C instrument-coverage
- Allow dynamic linking for iOS/tvOS targets

New targets:
- Add armv4t-none-eabi as a tier 3 target
- Add powerpc64-unknown-openbsd and riscv64-unknown-openbsd as tier 3 targets
- Refer to Rust's platform support page for more information on Rust's tiered platform support

Libraries:
- Don't generate PartialEq::ne in derive(PartialEq)
- Windows RNG: Use BCRYPT_RNG_ALG_HANDLE by default
- Forbid mixing System with direct system allocator calls
- Document no support for writing to non-blocking stdio/stderr
- std::layout::Layout size must not overflow isize::MAX when rounded up to align This also changes the safety conditions on Layout::from_size_align_unchecked.

Stabilized APIs:
- std::backtrace::Backtrace
- Bound::as_ref
- std::io::read_to_string
- ::cast_mut
- ::cast_const

These APIs are now stable in const contexts:
- ::offset_from
- ::offset_from

Cargo:
- Apply GitHub fast path even for partial hashes
- Do not add home bin path to PATH if it's already there
- Take priority into account within the pending queue. This slightly optimizes job scheduling by Cargo, with typically small improvements on larger crate graph builds.

Compatibility Notes:
- std::layout::Layout size must not overflow isize::MAX when rounded up to align. This also changes the safety conditions on Layout::from_size_align_unchecked.
- PollFn now only implements Unpin if the closure is Unpin. This is a possible breaking change if users were relying on the blanket unpin implementation. See discussion on the PR for details of why this change was made.
- Drop ExactSizeIterator impl from std::char::EscapeAscii This is a backwards-incompatible change to the standard library's surface area, but is unlikely to affect real world usage.
- Do not consider a single repeated lifetime eligible for elision in the return type This behavior was unintentionally changed in 1.64.0, and this release reverts that change by making this an error again.
- Reenable disabled early syntax gates as future-incompatibility lints
- Update the minimum external LLVM to 13
- Don't duplicate file descriptors into stdio fds
- Sunset RLS
- Deny usage of #![cfg_attr(..., crate_type = ...)] to set the crate type This strengthens the forward compatibility lint deprecated_cfg_attr_crate_type_name to deny.
- llvm-has-rust-patches allows setting the build system to treat the LLVM as having Rust-specific patches This option may need to be set for distributions that are building Rust with a patched LLVM via llvm-config, not the built-in LLVM.
- Combining three or more languages (e.g. Objective C, C++ and Rust) into one binary may hit linker limitations when using lld. For more information, see issue 102754.

Internal Changes:
- These changes do not affect any public interfaces of Rust, but they represent significant improvements to the performance or internals of rustc and related tools.
- Add x.sh and x.ps1 shell scripts
- compiletest: use target cfg instead of hard-coded tables
- Use object instead of LLVM for reading bitcode from rlibs
- Enable MIR inlining for optimized compilations This provides a 3-10% improvement in compiletimes for real world crates. See perf results.


Rust 1.63.0
Language:
- Remove migrate borrowck mode for pre-NLL errors
- Modify MIR building to drop repeat expressions with length zero
- Remove label/lifetime shadowing warnings
- Allow explicit generic arguments in the presence of impl Trait args
- Make cenum_impl_drop_cast warnings deny-by-default
- Prevent unwinding when -C panic=abort is used regardless of declared ABI
- Lub: don't bail out due to empty binders

Compiler:
- Stabilize the bundle native library modifier, also removing the deprecated static-nobundle linking kind
- Add Apple WatchOS compile targets*
- Add a Windows application manifest to rustc-main
- Refer to Rust's platform support page for more information on Rust's tiered platform support

Libraries:
- Implement Copy, Clone, PartialEq and Eq for core::fmt::Alignment
- Extend ptr::null and null_mut to all thin (including extern) types
- Impl Read and Write for VecDeque
- STD support for the Nintendo 3DS
- Make write/print macros eagerly drop temporaries
- Implement internal traits that enable [OsStr]::join
- Implement Hash for core::alloc::Layout
- Add capacity documentation for OsString
- Put a bound on collection misbehavior
- Make std::mem::needs_drop accept ?Sized
- Impl Termination for Infallible and then make the Result impls of Termination more generic
- Document Rust's stance on /proc/self/mem

Stabilized APIs:
- Array::from_fn
- Box::into_pin
- BinaryHeap::try_reserve
- BinaryHeap::try_reserve_exact
- OsString::try_reserve
- OsString::try_reserve_exact
- PathBuf::try_reserve
- PathBuf::try_reserve_exact
- Path::try_exists
- Ref::filter_map
- RefMut::filter_map
- NonNull::<[T]>::len
- ToOwned::clone_into
- Ipv6Addr::to_ipv4_mapped
- Unix::io::AsFd
- Unix::io::BorrowedFd<'fd>
- Unix::io::OwnedFd
- Windows::io::AsHandle
- Windows::io::BorrowedHandle<'handle>
- Windows::io::OwnedHandle
- Windows::io::HandleOrInvalid
- Windows::io::HandleOrNull
- Windows::io::InvalidHandleError
- Windows::io::NullHandleError
- Windows::io::AsSocket
- Windows::io::BorrowedSocket<'handle>
- Windows::io::OwnedSocket
- Thread::scope
- Thread::Scope
- Thread::ScopedJoinHandle

These APIs are now usable in const contexts:
- Array::from_ref
- Slice::from_ref
- Intrinsics::copy
- Intrinsics::copy_nonoverlapping
- <*const T>::copy_to
- <*const T>::copy_to_nonoverlapping
- <*mut T>::copy_to
- <*mut T>::copy_to_nonoverlapping
- <*mut T>::copy_from
- <*mut T>::copy_from_nonoverlapping
- Str::from_utf8
- Utf8Error::error_len
- Utf8Error::valid_up_to
- Condvar::new
- Mutex::new
- RwLock::new

Cargo:
- Stabilize the --config path command-line argument
- Expose rust-version in the environment as CARGO_PKG_RUST_VERSION


Rust 1.62.0
Language:
- Stabilize #[derive(Default)] on enums with a #[default] variant
- Stop validating some checks in dead code after functions with uninhabited return types
- Fix constants not getting dropped if part of a diverging expression
- Support unit struct/enum variant in destructuring assignment
- Remove mutable_borrow_reservation_conflict lint and allow the code pattern

Compiler:
- linker: Stop using whole-archive on dependencies of dylibs
- Make unaligned_references lint deny-by-default This lint is also a future compatibility lint, and is expected to eventually become a hard error.
- Only add codegen backend to dep info if -Zbinary-dep-depinfo is used
- Reject #[thread_local] attribute on non-static items
- Add tier 3 aarch64-pc-windows-gnullvm and x86_64-pc-windows-gnullvm targets*
- Implement a lint to warn about unused macro rules
- Promote x86_64-unknown-none target to Tier 2*

Libraries:
- Windows: Use a pipe relay for chaining pipes
- Replace Linux Mutex and Condvar with futex based ones
- Replace RwLock by a futex based one on Linux
- std: directly use pthread in UNIX parker implementation

Stabilized APIs:
- bool::then_some
- f32::total_cmp
- f64::total_cmp
- Stdin::lines
- windows::CommandExt::raw_arg
- impl Default for AssertUnwindSafe
- From for Rc<[u8]>
- From for Arc<[u8]>
- FusedIterator for EncodeWide
- RDM intrinsics on aarch64

Clippy:
- Create clippy lint against unexpectedly late drop for temporaries in match scrutinee expressions

Cargo:
- Added the cargo add command for adding dependencies to Cargo.toml from the command-line. docs
- Package ID specs now support name@version syntax in addition to the previous name:version to align with the behavior in cargo add and other tools. cargo install and cargo yank also now support this syntax so the version does not need to passed as a separate flag.
- The git and registry directories in Cargo's home directory (usually ~/.cargo) are now marked as cache directories so that they are not included in backups or content indexing (on Windows).
- Added automatic @ argfile support, which will use "response files" if the command-line to rustc exceeds the operating system's limit.

Compatibility Notes:
- cargo test now passes --target to rustdoc if the specified target is the same as the host target
- rustdoc: Remove .woff font files
- Enforce Copy bounds for repeat elements while considering lifetimes

Internal Changes:
- Unify ReentrantMutex implementations across all platforms


Rust 1.61.0
- Custom exit codes from main
- More capabilities for const fn
- Static handles for locked stdio
- Stabilized APIs
- Other changes


Rust 1.58.1
- The non_send_fields_in_send_ty Clippy lint was discovered to have too many false positives and has been moved to the experimental lints group (called "nursery")
- The useless_format Clippy lint has been updated to handle captured identifiers in format strings, introduced in Rust 1.58.0
- A regression in Rustfmt preventing generated files from being formatted when passed through the standard input has been fixed
- An incorrect error message displayed by rustc in some cases has been fixed


Rust 1.58.0
Language:
- Format strings can now capture arguments simply by writing {ident} in the string. This works in all macros accepting format strings. Support for this in panic! (panic!("{ident}")) requires the 2021 edition; panic invocations in previous editions that appear to be trying to use this will result in a warning lint about not having the intended effect.
- const T pointers can now be dereferenced in const contexts
- The rules for when a generic struct implements Unsize have been relaxed

Compiler:
- Add LLVM CFI support to the Rust compiler
- Stabilize -Z strip as -C strip. Note that while release builds already don't add debug symbols for the code you compile, the compiled standard library that ships with Rust includes debug symbols, so you may want to use the strip option to remove these symbols to produce smaller release binaries. Note that this release only includes support in rustc, not directly in cargo.
- Add support for LLVM coverage mapping format versions 5 and 6
- Emit LLVM optimization remarks when enabled with -Cremark
- Update the minimum external LLVM to 12
- Add x86_64-unknown-none at Tier 3*
- Build musl dist artifacts with debuginfo enabled. When building release binaries using musl, you may want to use the newly stabilized strip option to remove these debug symbols, reducing the size of your binaries.
- Don't abort compilation after giving a lint error
- Error messages point at the source of trait bound obligations in more places
- Refer to Rust's platform support page for more information on Rust's tiered platform support.

Libraries:
- All remaining functions in the standard library have #[must_use] annotations where appropriate, producing a warning when ignoring their return value. This helps catch mistakes such as expecting a function to mutate a value in place rather than return a new value.
- Paths are automatically canonicalized on Windows for operations that support it
- Re-enable debug checks for copy and copy_nonoverlapping
- Implement RefUnwindSafe for Rc
- Make RSplit<T, P>: Clone not require T: Clone
- Implement Termination for Result<Infallible, E>. This allows writing fn main() -> Result<Infallible, ErrorType>, for a program whose successful exits never involve returning from main (for instance, a program that calls exit, or that uses exec to run another program).

Stabilized APIs:
- Metadata::is_symlink
- Path::is_symlink
- {integer}::saturating_div
- Option::unwrap_unchecked
- Result::unwrap_unchecked
- Result::unwrap_err_unchecked
- NonZero{unsigned}::is_power_of_two
- File::options
- These APIs are now usable in const contexts:
- Duration::new
- Duration::checked_add
- Duration::saturating_add
- Duration::checked_sub
- Duration::saturating_sub
- Duration::checked_mul
- Duration::saturating_mul
- Duration::checked_div
- MaybeUninit::as_ptr
- MaybeUninit::as_mut_ptr
- MaybeUninit::assume_init
- MaybeUninit::assume_init_ref

Cargo:
- Add --message-format for install command
- Warn when alias shadows external subcommand

Rustdoc:
- Show all Deref implementations recursively in rustdoc
- Use computed visibility in rustdoc

Compatibility Notes:
- Try all stable method candidates first before trying unstable ones. This change ensures that adding new nightly-only methods to the Rust standard library will not break code invoking methods of the same name from traits outside the standard library.
- Windows: std::process::Command will no longer search the current directory for executables.
- All proc-macro backward-compatibility lints are now deny-by-default.
- proc_macro: Append .0 to unsuffixed float if it would otherwise become int token
- Refactor weak symbols in std::sys::unix. This optimizes accesses to glibc functions, by avoiding the use of dlopen. This does not increase the minimum expected version of glibc. However, software distributions that use symbol versions to detect library dependencies, and which take weak symbols into account in that analysis, may detect rust binaries as requiring newer versions of glibc.
- rustdoc now rejects some unexpected semicolons in doctests

Internal Changes:
- These changes provide no direct user facing benefits, but represent significant improvements to the internals and overall performance of rustc and related tools.
- Implement coherence checks for negative trait impls
- Add rustc lint, warning when iterating over hashmaps
- Optimize live point computation
- Enable verification for 1/32nd of queries loaded from disk
- Implement version of normalize_erasing_regions that allows for normalization failure


Rust 1.57.0
Language:
- Macro attributes may follow #[derive] and will see the original (pre-cfg) input
- Accept curly-brace macros in expressions, like m!{ .. }.method() and m!{ .. }?
- Allow panicking in constant evaluation

Compiler:
- Create more accurate debuginfo for vtables
- Add armv6k-nintendo-3ds at Tier 3*
- Add armv7-unknown-linux-uclibceabihf at Tier 3*
- Add m68k-unknown-linux-gnu at Tier 3*
- Add SOLID targets at Tier 3*: aarch64-kmc-solid_asp3, armv7a-kmc-solid_asp3-eabi, armv7a-kmc-solid_asp3-eabihf
- Refer to Rust's platform support page for more information on Rust's tiered platform support

Libraries:
- Avoid allocations and copying in Vec::leak
- Add #[repr(i8)] to Ordering
- Optimize File::read_to_end and read_to_string
- Update to Unicode 14.0
- Many more functions are marked #[must_use], producing a warning when ignoring their return value. This helps catch mistakes such as expecting a function to mutate a value in place rather than return a new value.

Stabilised APIs:
- [T; N]::as_mut_slice
- [T; N]::as_slice
- collections::TryReserveError
- HashMap::try_reserve
- HashSet::try_reserve
- String::try_reserve
- String::try_reserve_exact
- Vec::try_reserve
- Vec::try_reserve_exact
- VecDeque::try_reserve
- VecDeque::try_reserve_exact
- Iterator::map_while
- iter::MapWhile
- proc_macro::is_available
- Command::get_program
- Command::get_args
- Command::get_envs
- Command::get_current_dir
- CommandArgs
- CommandEnvs
- These APIs are now usable in const contexts:
- hint::unreachable_unchecked

Cargo:
- Stabilize custom profiles
- Compatibility notes

Internal changes:
- These changes provide no direct user facing benefits, but represent significant improvements to the internals and overall performance of rustc and related tools
- Added an experimental backend for codegen with libgccjit


Rust 1.55.0
Language:
- You can now write open "from" range patterns (X..), which will start at X and will end at the maximum value of the integer
- You can now explicitly import the prelude of different editions through std::prelude (e.g. use std::prelude::rust_2021::*;).

Compiler:
- Added tier 3* support for powerpc64le-unknown-freebsd
- * Refer to Rust's platform support page for more information on Rust's tiered platform support
- Libraries
- Updated std's float parsing to use the Eisel-Lemire algorithm. These improvements should in general provide faster string parsing of floats, no longer reject certain valid floating point values, and reduce the produced code size for non-stripped artifacts.
- string::Drain now implements AsRef and AsRef<[u8]>.

Stabilised APIs:
- Bound::cloned
- Drain::as_str
- IntoInnerError::into_error
- IntoInnerError::into_parts
- MaybeUninit::assume_init_mut
- MaybeUninit::assume_init_ref
- MaybeUninit::write
- array::map
- ops::ControlFlow
- x86::_bittest
- x86::_bittestandcomplement
- x86::_bittestandreset
- x86::_bittestandset
- x86_64::_bittest64
- x86_64::_bittestandcomplement64
- x86_64::_bittestandreset64
- x86_64::_bittestandset64

Cargo:
- Cargo will now deduplicate compiler diagnostics to the terminal when invoking rustc in parallel such as when using cargo test
- The package definition in cargo metadata now includes the "default_run" field from the manifest
- Added cargo d as an alias for cargo doc
- Added {lib} as formatting option for cargo tree to print the "lib_name" of packages

Rustdoc:
- Added "Go to item on exact match" search option
- The "Implementors" section on traits no longer shows redundant method definitions
- Trait implementations are toggled open by default. This should make the implementations more searchable by tools like CTRL+F in your browser.
- Intra-doc links should now correctly resolve associated items (e.g. methods) through type aliases
- Traits which are marked with #[doc(hidden)] will no longer appear in the "Trait Implementations" section


Rust 1.54.0
Language:
- You can now use macros for values in built-in attribute macros. While a seemingly minor addition on its own, this enables a lot of powerful functionality when combined correctly. Most notably you can now include external documentation in your crate by writing the following.
- #![doc = include_str!("README.md")]

You can also use this to include auto-generated modules:
- #[path = concat!(env!("OUT_DIR"), "/generated.rs")] mod generated
- You can now cast between unsized slice types (and types which contain unsized slices) in const fn
- You can now use multiple generic lifetimes with impl Trait where the lifetimes don't explicitly outlive another. In code this means that you can now have impl Trait<'a, 'b> where as before you could only have impl Trait<'a, 'b> where 'b: 'a.

Compiler:
- Rustc will now search for custom JSON targets in /lib/rustlib//target.json where / is the "sysroot" directory. You can find your sysroot directory by running rustc --print sysroot.
- Added wasm as a target_family for WebAssembly platforms
- You can now use #[target_feature] on safe functions when targeting WebAssembly platforms
- Improved debugger output for enums on Windows MSVC platforms
- Added tier 3* support for bpfel-unknown-none and bpfeb-unknown-none
- Refer to Rust's platform support page for more information on Rust's tiered platform support

Libraries:
- Panic::panic_any will now #[track_caller]
- Added OutOfMemory as a variant of io::ErrorKind
- Proc_macro::Literal now implements FromStr
- The implementations of vendor intrinsics in core::arch have been significantly refactored. The main user-visible changes are a 50% reduction in the size of libcore.rlib and stricter validation of constant operands passed to intrinsics. The latter is technically a breaking change, but allows Rust to more closely match the C vendor intrinsics API.
- Stabilized APIs:
- BTreeMap::into_keys
- BTreeMap::into_values
- HashMap::into_keys
- HashMap::into_values
- Arch::wasm32
- VecDeque::binary_search
- VecDeque::binary_search_by
- VecDeque::binary_search_by_key
- VecDeque::partition_point

Cargo:
- Added the --prune option to cargo-tree to remove a package from the dependency graph
- Added the --depth option to cargo-tree to print only to a certain depth in the tree
- Added the no-proc-macro value to cargo-tree --edges to hide procedural macro dependencies
- A new environment variable named CARGO_TARGET_TMPDIR is available. This variable points to a directory that integration tests and benches can use as a "scratchpad" for testing filesystem operations.

Compatibility Notes:
- Mixing Option and Result via ? is no longer permitted in closures for inferred types
- Previously unsound code is no longer permitted where different constructors in branches could require different lifetimes
- As previously mentioned the std::arch instrinsics now uses stricter const checking than before and may reject some previously accepted code
- I128 multiplication on Cortex M0+ platforms currently unconditionally causes overflow when compiled with codegen-units = 1


Rust 1.53.0
Language:
- You can now use unicode for identifiers. This allows multilingual identifiers but still doesn't allow glyphs that are not considered characters such as ◆ or 🦀. More specifically you can now use any identifier that matches the UAX #31 "Unicode Identifier and Pattern Syntax" standard. This is the same standard as languages like Python, however Rust uses NFC normalization which may be different from other languages.
- You can now specify "or patterns" inside pattern matches. Previously you could only use | (OR) on complete patterns. E.g.
- Added the :pat_param macro_rules! matcher. This matcher has the same semantics as the :pat matcher. This is to allow :pat to change semantics to being a pattern fragment in a future edition.

Compiler:
- Updated the minimum external LLVM version to LLVM 10
- Added Tier 3* support for the wasm64-unknown-unknown target
- Improved debuginfo for closures and async functions on Windows MSVC

Libraries:
- Abort messages will now forward to android_set_abort_message on Android platforms when available
- slice::IterMut<'_, T> now implements AsRef<[T]>
- Arrays of any length now implement IntoIterator. Currently calling .into_iter() as a method on an array will return impl Iterator<Item=&T>, but this may change in a future edition to change Item to T. Calling IntoIterator::into_iter directly on arrays will provide impl Iterator<Item=T> as expected.
- leading_zeros, and trailing_zeros are now available on all NonZero integer types.
- {f32, f64}::from_str now parse and print special values (NaN, -0) according to IEEE RFC 754.
- You can now index into slices using (Bound, Bound)
- Add the BITS associated constant to all numeric types


Rust 1.52.1
- Change log not available for this version


Rust 1.52.0
Language:
- Added the unsafe_op_in_unsafe_fn lint, which checks whether the unsafe code in an unsafe fn is wrapped in a unsafe block. This lint is allowed by default, and may become a warning or hard error in a future edition.
- You can now cast mutable references to arrays to a pointer of the same type as the element

Compiler:
- Upgraded the default LLVM to LLVM 12

Added tier 3* support for the following targets:
- s390x-unknown-linux-musl
- riscv32gc-unknown-linux-musl & riscv64gc-unknown-linux-musl
- powerpc-unknown-openbsd
- Refer to Rust's platform support page for more information on Rust's tiered platform support

Libraries:
- OsString now implements Extend and FromIterator
- cmp::Reverse now has #[repr(transparent)] representation
- Arc now implements error::Error
- All integer division and remainder operations are now const

Stabilised APIs:
- Arguments::as_str
- char::MAX
- char::REPLACEMENT_CHARACTER
- char::UNICODE_VERSION
- char::decode_utf16
- char::from_digit
- char::from_u32_unchecked
- char::from_u32
- slice::partition_point
- str::rsplit_once
- str::split_once
- The following previously stable APIs are now const.:
- char::len_utf8
- char::len_utf16
- char::to_ascii_uppercase
- char::to_ascii_lowercase
- char::eq_ignore_ascii_case
- u8::to_ascii_uppercase
- u8::to_ascii_lowercase
- u8::eq_ignore_ascii_case

Rustdoc:
- Rustdoc lints are now treated as a tool lint, meaning that lints are now prefixed with rustdoc:: (e.g. #[warn(rustdoc::non_autolinks)]). Using the old style is still allowed, and will become a warning in a future release.
- Rustdoc now supports argument files
- Rustdoc now generates smart punctuation for documentation
- You can now use "task lists" in Rustdoc Markdown

Misc:
- You can now pass multiple filters to tests. E.g. cargo test -- foo bar will run all tests that match foo and bar
- Rustup now distributes PDB symbols for the std library on Windows, allowing you to see std symbols when debugging

Internal Only:
- These changes provide no direct user facing benefits, but represent significant improvements to the internals and overall performance of rustc and related tools
- Check the result cache before the DepGraph when ensuring queries
- Try fast_reject::simplify_type in coherence before doing full check
- Only store a LocalDefId in some HIR nodes
- Store HIR attributes in a side table

Compatibility Notes:
- Cargo build scripts are now forbidden from setting RUSTC_BOOTSTRAP
- Removed support for the x86_64-rumprun-netbsd target
- Deprecated the x86_64-sun-solaris target in favor of x86_64-pc-solaris
- Rustdoc now only accepts ,, , and t as delimiters for specifying languages in code blocks
- Rustc now catches more cases of pub_use_of_private_extern_crate
- Changes in how proc macros handle whitespace may lead to panics when used with older proc-macro-hack versions. A cargo update should be sufficient to fix this in all cases.


Rust 1.51.0
Language:
- You can now parameterize items such as functions, traits, and structs by constant values in addition to by types and lifetimes. Also known as "const generics" E.g. you can now write the following. Note: Only values of primitive integers, bool, or char types are currently permitted.

Compiler:
- Added the -Csplit-debuginfo codegen option for macOS platforms. This option controls whether debug information is split across multiple files or packed into a single file. Note This option is unstable on other platforms.
- Added tier 3* support for aarch64_be-unknown-linux-gnu, aarch64-unknown-linux-gnu_ilp32, and aarch64_be-unknown-linux-gnu_ilp32 targets
- Added tier 3 support for i386-unknown-linux-gnu and i486-unknown-linux-gnu targets
- The target-cpu=native option will now detect individual features of CPUs
- Refer to Rust's platform support page for more information on Rust's tiered platform support

Libraries:
- Box::downcast is now also implemented for any dyn Any + Send + Sync object
- str now implements AsMut
- u64 and u128 now implement From
- Error is now implemented for &T where T implements Error
- Poll::{map_ok, map_err} are now implemented for Poll
- unsigned_abs is now implemented for all signed integer types
- io::Empty now implements io::Seek
- rc::Weak and sync::Weak's methods such as as_ptr are now implemented for T: ?Sized types
- Stabilized APIs:
- Arc::decrement_strong_count
- Arc::increment_strong_count
- Once::call_once_force
- Peekable::next_if_eq
- Peekable::next_if
- Seek::stream_position
- array::IntoIter
- panic::panic_any
- ptr::addr_of!
- ptr::addr_of_mut!
- slice::fill_with
- slice::split_inclusive_mut
- slice::split_inclusive
- slice::strip_prefix
- slice::strip_suffix
- str::split_inclusive
- sync::OnceState
- task::Wake

Cargo:
- Added the split-debuginfo profile option to control the -Csplit-debuginfo codegen option
- Added the resolver field to Cargo.toml to enable the new feature resolver and CLI option behavior. Version 2 of the feature resolver will try to avoid unifying features of dependencies where that unification could be unwanted. Such as using the same dependency with a std feature in a build scripts and proc-macros, while using the no-std feature in the final binary. See the Cargo book documentation for more information on the feature.

Rustdoc:
- Rustdoc will now include documentation for methods available from nested Deref traits
- You can now provide a --default-theme flag which sets the default theme to use for documentation

Various improvements to intra-doc links:
- You can link to non-path primitives such as slice
- You can link to associated items
- You can now include generic parameters when linking to items, like Vec

Misc:
- You can now pass --include-ignored to tests (e.g. with cargo test -- --include-ignored) to include testing tests marked #[ignore]

Compatibility Notes:
- WASI platforms no longer use the wasm-bindgen ABI, and instead use the wasm32 ABI
- rustc no longer promotes division, modulo and indexing operations to const that could fail
- The minimum version of glibc for the following platforms has been bumped to version 2.31 for the distributed artifacts
- armv5te-unknown-linux-gnueabi
- sparc64-unknown-linux-gnu
- thumbv7neon-unknown-linux-gnueabihf
- armv7-unknown-linux-gnueabi
- x86_64-unknown-linux-gnux32

Internal Only:
- Consistently avoid cons

Join our mailing list

Stay up to date with latest software releases, news, software discounts, deals and more.

Subscribe