Rust is een programmeertaal bedacht door Graydon Hoare en oorspronkelijk ontwikkeld door Mozilla. Het is deels geïnspireerd op de programmeertaal C, maar kent syntactische en semantische verschillen. Het focust op veiligheid en moet moderne computersystemen efficiënter benutten. Het wordt ingezet door onder andere Cloudflare, OVH, Mozilla, Deliveroo, Coursera, AppSignal en Threema. Versie 1.87 is uitgebracht en de releasenotes voor die uitgave kunnen hieronder worden gevonden.
Anonymous pipes1.87 adds access to anonymous pipes to the standard library. This includes integration with
Safe architecture intrinsicsstd::process::Command
's input/output methods. For example, joining the stdout and stderr streams into one is now relatively straightforward, as shown below, while it used to require either extra threads or platform-specific functions.Most
std::arch
intrinsics that are unsafe only due to requiring target features to be enabled are now callable in safe code that has those features enabled. For example, the following toy program which implements summing an array using manual intrinsics can now use safe code for the core loop.asm!
jumps to Rust codeInline assembly (
asm!
) can now jump to labeled blocks within Rust code. This enables more flexible low-level programming, such as implementing optimized control flow in OS kernels or interacting with hardware more efficiently.
- The
asm!
macro now supports a label operand, which acts as a jump target.- The label must be a block expression with a return type of
()
or!
.- The block executes when jumped to, and execution continues after the
asm!
block.- Using output and label operands in the same
asm!
invocation remains unstable.
For more details, please consult the reference.
Precise capturing (+ use<...>
) inimpl Trait
in trait definitionsThis release stabilizes specifying the specific captured generic types and lifetimes in trait definitions using
Stabilized APIsimpl Trait
return types. This allows using this feature in trait definitions, expanding on the stabilization for non-trait functions in 1.82.
Vec::extract_if
vec::ExtractIf
LinkedList::extract_if
linked_list::ExtractIf
<[T]>::split_off
<[T]>::split_off_mut
<[T]>::split_off_first
<[T]>::split_off_first_mut
<[T]>::split_off_last
<[T]>::split_off_last_mut
String::extend_from_within
os_str::Display
OsString::display
OsStr::display
io::pipe
io::PipeReader
io::PipeWriter
impl From<PipeReader> for OwnedHandle
impl From<PipeWriter> for OwnedHandle
impl From<PipeReader> for Stdio
impl From<PipeWriter> for Stdio
impl From<PipeReader> for OwnedFd
impl From<PipeWriter> for OwnedFd
Box<MaybeUninit<T>>::write
impl TryFrom<Vec<u8>> for String
<*const T>::offset_from_unsigned
<*const T>::byte_offset_from_unsigned
<*mut T>::offset_from_unsigned
<*mut T>::byte_offset_from_unsigned
NonNull::offset_from_unsigned
NonNull::byte_offset_from_unsigned
<uN>::cast_signed
NonZero::<uN>::cast_signed
.<iN>::cast_unsigned
.NonZero::<iN>::cast_unsigned
.<uN>::is_multiple_of
<uN>::unbounded_shl
<uN>::unbounded_shr
<iN>::unbounded_shl
<iN>::unbounded_shr
<iN>::midpoint
<str>::from_utf8
<str>::from_utf8_mut
<str>::from_utf8_unchecked
<str>::from_utf8_unchecked_mut
These previously stable APIs are now stable in const contexts:
core::str::from_utf8_mut
<[T]>::copy_from_slice
SocketAddr::set_ip
SocketAddr::set_port
,SocketAddrV4::set_ip
SocketAddrV4::set_port
,SocketAddrV6::set_ip
SocketAddrV6::set_port
SocketAddrV6::set_flowinfo
SocketAddrV6::set_scope_id
char::is_digit
char::is_whitespace
<[[T; N]]>::as_flattened
<[[T; N]]>::as_flattened_mut
String::into_bytes
String::as_str
String::capacity
String::as_bytes
String::len
String::is_empty
String::as_mut_str
String::as_mut_vec
Vec::as_ptr
Vec::as_slice
Vec::capacity
Vec::len
Vec::is_empty
Vec::as_mut_slice
Vec::as_mut_ptr
i586-pc-windows-msvc
target removalThe Tier 2 target
Other changesi586-pc-windows-msvc
has been removed.i586-pc-windows-msvc
's difference to the much more popular Tier 1 targeti686-pc-windows-msvc
is thati586-pc-windows-msvc
does not require SSE2 instruction support. But Windows 10, the minimum required OS version of allwindows
targets (except thewin7
targets), requires SSE2 instructions itself. All users currently targetingi586-pc-windows-msvc
should migrate toi686-pc-windows-msvc
. You can check the Major Change Proposal for more information.Check out everything that changed in Rust, Cargo, and Clippy.