Rust 1.24.0
Language
- External
sysv64ffi is now available. eg.extern "sysv64" fn foo () {}
Compiler
- rustc now uses 16 codegen units by default for release builds. For the fastest builds, utilize
codegen-units=1. - Added
armv4t-unknown-linux-gnueabitarget. - Add
aarch64-unknown-openbsdsupport
Libraries
str::find::<char>now uses memchr. This should lead to a 10x improvement in performance in the majority of cases.OsStr'sDebugimplementation is now lossless and consistent with Windows.time::{SystemTime, Instant}now implementHash.- impl
From<bool>forAtomicBool - impl
From<{CString, &CStr}>for{Arc<CStr>, Rc<CStr>} - impl
From<{OsString, &OsStr}>for{Arc<OsStr>, Rc<OsStr>} - impl
From<{PathBuf, &Path}>for{Arc<Path>, Rc<Path>} - float::from_bits now just uses transmute. This provides some optimisations from LLVM.
- Copied
AsciiExtmethods ontochar - Remove
T: Sizedrequirement onptr::is_null() - impl
From<RecvError>for{TryRecvError, RecvTimeoutError} - Optimised
f32::{min, max}to generate more efficient x86 assembly [u8]::containsnow uses memchr which provides a 3x speed improvement
Stabilized APIs
The following functions can now be used in a constant expression. eg. let buffer: [u8; size_of::<usize>()];, static COUNTER: AtomicUsize = AtomicUsize::new(1);
AtomicBool::newAtomicUsize::newAtomicIsize::newAtomicPtr::newCell::new{integer}::min_value{integer}::max_valuemem::size_ofmem::align_ofptr::nullptr::null_mutRefCell::newUnsafeCell::new
Cargo
- Added a
workspace.default-membersconfig that overrides implied--allin virtual workspaces. - Enable incremental by default on development builds. Also added configuration keys to
Cargo.tomland.cargo/configto disable on a per-project or global basis respectively.
Misc
Compatibility Notes
- Floating point types
Debugimpl now always prints a decimal point. Ipv6Addrnow rejects superfluous::'s in IPv6 addresses This is in accordance with IETF RFC 4291 §2.2.- Unwinding will no longer go past FFI boundaries, and will instead abort.
Formatter::flagsmethod is now deprecated. Thesign_plus,sign_minus,alternate, andsign_aware_zero_padshould be used instead.- Leading zeros in tuple struct members is now an error
column!()macro is one-based instead of zero-basedfmt::Argumentscan no longer be shared across threads- Access to
#[repr(packed)]struct fields is now unsafe - Cargo sets a different working directory for the compiler