Rust is systems programming language, which is intended to be fast and memory-safe through stronger typing, and prevent race conditions.
It's developed by Mozilla, multi-paradigm, supports concurrent execution, procedural, imperative, actor-based, object-oriented and pure-functional design schemes, with a syntax close to C++. The self-hosting
compiler utilizes LLVM and its resulting binaries are comparable in performance to C++. It also features algebraic data types, pattern matching, closures,
type inference, zero-cost abstractions, guaranteed memory safety, minimal runtime, and efficient C bindings.
Homepage
Download
Recent Releases
1.83.005 Dec 2024 04:05
minor feature:
lt;p gt; lt;a id="user-content-1.83.0-Language" gt; lt;/a gt; lt;/p gt;.
lt;h2 gt;Language lt;/h2 gt;.
lt;ul gt;.
lt;li gt; lt;a href="https://github.com/rust-lang/rust/pull/129195" data-hovercard-type="pull_request" data-hovercard-url="/rust-lang/rust/pull/129195/hovercard" gt;Stabilize lt;code gt; amp;amp;mut lt;/code gt;, lt;code gt;*mut lt;/code gt;, lt;code gt; amp;amp;Cell lt;/code gt;, and lt;code gt;*const Cell lt;/code gt; in const. lt;/a gt; lt;/li gt;.
lt;li gt; lt;a href="https://github.com/rust-lang/rust/pull/129759" data-hovercard-type="pull_request" data-hovercard-url="/rust-lang/rust/pull/129759/hovercard" gt;Allow creating references to statics in lt;code gt;const lt;/code gt; initializers. lt;/a gt; lt;/li gt;.
lt;li gt; lt;a href="https://github.com/rust-lang/rust/pull/126452" data-hovercard-type="pull_request" data-hovercard-url="/rust-lang/rust/pull/126452/hovercard" gt;Implement raw lifetimes and labels ( lt;code gt;'r#ident lt;/code gt;). lt;/a gt; lt;/li gt;.
lt;li gt; lt;a href="https://github.com/rust-lang/rust/pull/128778" data-hovercard-type="pull_request" data-hovercard-url="/rust-lang/rust/pull/128778/hovercard" gt;Define behavior when atomic and non-atomic reads race. lt;/a gt; lt;/li gt;.
lt;li gt; lt;a href="https://github.com/rust-lang/rust/pull/128934" data-hovercard-type="pull_request" data-hovercard-url="/rust-lang/rust/pull/128934/hovercard" gt;Non-exhaustive structs may now be empty. lt;/a gt; lt;/li gt;.
lt;li gt; lt;a href="https://github.com/rust-lang/rust/pull/129392" data-hovercard-type="pull_request" data-hovercard-url="/rust-lang/rust/pull/129392/hovercard" gt;Disallow implicit coercions from places of type lt;code gt;! lt;/code gt; lt;/a gt; lt;/li gt;.
lt;li gt; lt;a href="https://github.com/rust-lang/rust/pull/129753" data-hovercard-type="pull_request" data-hovercard-url="/rust-lang/rust/pull/129753/hovercard" gt; lt;code gt;const extern lt;/code gt; functions can now be defined for other calling conventions. lt
1.82.027 Nov 2024 11:05
minor feature:
lt;p gt; lt;a id="user-content-1.82.0-Language" gt; lt;/a gt; lt;/p gt;.
lt;h2 gt;Language lt;/h2 gt;.
lt;ul gt;.
lt;li gt; lt;a href="https://github.com/rust-lang/rust/pull/120221/" data-hovercard-type="pull_request" data-hovercard-url="/rust-lang/rust/pull/120221/hovercard" gt;Don't make statement nonterminals match pattern nonterminals lt;/a gt; lt;/li gt;.
lt;li gt; lt;a href="https://github.com/rust-lang/rust/pull/122792" data-hovercard-type="pull_request" data-hovercard-url="/rust-lang/rust/pull/122792/hovercard" gt;Patterns matching empty types can now be omitted in common cases lt;/a gt; lt;/li gt;.
lt;li gt; lt;a href="https://github.com/rust-lang/rust/pull/124336" data-hovercard-type="pull_request" data-hovercard-url="/rust-lang/rust/pull/124336/hovercard" gt;Enforce supertrait outlives obligations when using trait impls lt;/a gt; lt;/li gt;.
lt;li gt; lt;a href="https://github.com/rust-lang/rust/pull/125834" data-hovercard-type="pull_request" data-hovercard-url="/rust-lang/rust/pull/125834/hovercard" gt; lt;code gt;addr_of(_mut)! lt;/code gt; macros and the newly stabilized lt;code gt; amp;amp;raw (const mut) lt;/code gt; are now safe to use with all static items lt;/a gt; lt;/li gt;.
lt;li gt; lt;a href="https://github.com/rust-lang/rust/pull/126152/" data-hovercard-type="pull_request" data-hovercard-url="/rust-lang/rust/pull/126152/hovercard" gt;size_of_val_raw: for length 0 this is safe to call lt;/a gt; lt;/li gt;.
lt;li gt; lt;a href="https://github.com/rust-lang/rust/pull/127054/" data-hovercard-type="pull_request" data-hovercard-url="/rust-lang/rust/pull/127054/hovercard" gt;Reorder trait bound modifiers lt;em gt;after lt;/em gt; lt;code gt;for amp;lt;... amp;gt; lt;/code gt; binder in trait bounds lt;/a gt; lt;/li gt;.
lt;li gt; lt;a href="https://github.com/rust-lang/rust/pull/127672" data-hovercard-type="pull_request" data-hovercard-url="/rust-lang/rust/pull/127672/hovercard" gt;Stabilize opaque type precise capturing (RFC 3617) lt;/a gt; lt;
1.81.023 Nov 2024 09:25
minor feature:
lt;p gt; lt;a id="user-content-1.81.0-Language" gt; lt;/a gt; lt;/p gt;.
lt;h2 gt;Language lt;/h2 gt;.
lt;ul gt;.
lt;li gt; lt;a href="https://github.com/rust-lang/rust/pull/116088/" data-hovercard-type="pull_request" data-hovercard-url="/rust-lang/rust/pull/116088/hovercard" gt;Abort on uncaught panics in lt;code gt;extern "C" lt;/code gt; functions. lt;/a gt; lt;/li gt;.
lt;li gt; lt;a href="https://github.com/rust-lang/rust/pull/117967/" data-hovercard-type="pull_request" data-hovercard-url="/rust-lang/rust/pull/117967/hovercard" gt;ambiguous cases of multiple lt;code gt; amp;amp; lt;/code gt; in elided self lifetimes. lt;/a gt; lt;/li gt;.
lt;li gt; lt;a href="https://github.com/rust-lang/rust/pull/120924/" data-hovercard-type="pull_request" data-hovercard-url="/rust-lang/rust/pull/120924/hovercard" gt;Stabilize lt;code gt;# expect lt;/code gt; for lints (RFC 2383), lt;/a gt; like lt;code gt;# allow lt;/code gt; with a warning if the lint is lt;em gt;not lt;/em gt; fulfilled. lt;/li gt;.
lt;li gt; lt;a href="https://github.com/rust-lang/rust/pull/123962/" data-hovercard-type="pull_request" data-hovercard-url="/rust-lang/rust/pull/123962/hovercard" gt;Change method resolution to constrain hidden types instead of rejecting method candidates. lt;/a gt; lt;/li gt;.
lt;li gt; lt;a href="https://github.com/rust-lang/rust/pull/124211/" data-hovercard-type="pull_request" data-hovercard-url="/rust-lang/rust/pull/124211/hovercard" gt;Bump lt;code gt;elided_lifetimes_in_associated_constant lt;/code gt; to deny. lt;/a gt; lt;/li gt;.
lt;li gt; lt;a href="https://github.com/rust-lang/rust/pull/124921/" data-hovercard-type="pull_request" data-hovercard-url="/rust-lang/rust/pull/124921/hovercard" gt; lt;code gt;offset_from lt;/code gt;: always allow pointers to point to the same address. lt;/a gt; lt;/li gt;.
lt;li gt; lt;a href="https://github.com/rust-lang/rust/pull/125447/" data-hovercard-type="pull_request" data-hovercard-url="/rust-lang/rust/pull/125447/hovercard" g
1.80.123 Nov 2024 07:05
minor feature:
lt;p gt; lt;a id="user-content-1.80.1" gt; lt;/a gt; lt;/p gt;.
lt;ul gt;.
lt;li gt; lt;a href="https://github.com/rust-lang/rust/pull/128271" data-hovercard-type="pull_request" data-hovercard-url="/rust-lang/rust/pull/128271/hovercard" gt;miscompilation in the jump threading MIR optimization when comparing floats lt;/a gt; lt;/li gt;.
lt;li gt; lt;a href="https://github.com/rust-lang/rust/pull/128618" data-hovercard-type="pull_request" data-hovercard-url="/rust-lang/rust/pull/128618/hovercard" gt;Revert changes to the lt;code gt;dead_code lt;/code gt; lint from 1.80.0 lt;/a gt; lt;/li gt;.
lt;/ul gt;.
1.80.019 Aug 2024 03:25
minor feature:
lt;p gt; lt;a id="user-content-1.80-Language" gt; lt;/a gt; lt;/p gt;.
lt;h2 gt;Language lt;/h2 gt;.
lt;ul gt;.
lt;li gt; lt;a href="https://github.com/rust-lang/rust/pull/116675/" data-hovercard-type="pull_request" data-hovercard-url="/rust-lang/rust/pull/116675/hovercard" gt;Document maximum allocation size lt;/a gt; lt;/li gt;.
lt;li gt; lt;a href="https://github.com/rust-lang/rust/pull/117329/" data-hovercard-type="pull_request" data-hovercard-url="/rust-lang/rust/pull/117329/hovercard" gt;Allow zero-byte offsets and ZST read/writes on arbitrary pointers lt;/a gt; lt;/li gt;.
lt;li gt; lt;a href="https://github.com/rust-lang/rust/pull/124048/" data-hovercard-type="pull_request" data-hovercard-url="/rust-lang/rust/pull/124048/hovercard" gt;Support C23's variadics without a named parameter lt;/a gt; lt;/li gt;.
lt;li gt; lt;a href="https://github.com/rust-lang/rust/pull/124459/" data-hovercard-type="pull_request" data-hovercard-url="/rust-lang/rust/pull/124459/hovercard" gt;Stabilize lt;code gt;exclusive_range_pattern lt;/code gt; feature lt;/a gt; lt;/li gt;.
lt;li gt; lt;a href="https://github.com/rust-lang/rust/pull/124870" data-hovercard-type="pull_request" data-hovercard-url="/rust-lang/rust/pull/124870/hovercard" gt;Guarantee layout and ABI of lt;code gt;Result lt;/code gt; in some scenarios lt;/a gt; lt;/li gt;.
lt;/ul gt;.
lt;p gt; lt;a id="user-content-1.80-Compiler" gt; lt;/a gt; lt;/p gt;.
lt;h2 gt;Compiler lt;/h2 gt;.
lt;ul gt;.
lt;li gt; lt;a href="https://github.com/rust-lang/rust/pull/124892/" data-hovercard-type="pull_request" data-hovercard-url="/rust-lang/rust/pull/124892/hovercard" gt;Update cc crate to v1.0.97 allowing additional spectre mitigations on MSVC targets lt;/a gt; lt;/li gt;.
lt;li gt; lt;a href="https://github.com/rust-lang/rust/pull/125360/" data-hovercard-type="pull_request" data-hovercard-url="/rust-lang/rust/pull/125360/hovercard" gt;Allow field reordering on types marked lt;code gt;repr(packed(1)) lt;/code gt; lt;/a gt; lt;/
1.79.014 Jun 2024 22:05
minor feature:
lt;p gt; lt;a id="user-content-1.79.0-Language" gt; lt;/a gt; lt;/p gt;.
lt;h2 gt;Language lt;/h2 gt;.
lt;ul gt;.
lt;li gt; lt;a href="https://github.com/rust-lang/rust/pull/104087/" data-hovercard-type="pull_request" data-hovercard-url="/rust-lang/rust/pull/104087/hovercard" gt;Stabilize inline lt;code gt;const lt;/code gt; expressions. lt;/a gt; lt;/li gt;.
lt;li gt; lt;a href="https://github.com/rust-lang/rust/pull/116935/" data-hovercard-type="pull_request" data-hovercard-url="/rust-lang/rust/pull/116935/hovercard" gt;Prevent opaque types being instantiated twice with different regions within the same function. lt;/a gt; lt;/li gt;.
lt;li gt; lt;a href="https://github.com/rust-lang/rust/pull/117457/" data-hovercard-type="pull_request" data-hovercard-url="/rust-lang/rust/pull/117457/hovercard" gt;Stabilize WebAssembly target features that are in phase 4 and 5. lt;/a gt; lt;/li gt;.
lt;li gt; lt;a href="https://github.com/rust-lang/rust/pull/118391/" data-hovercard-type="pull_request" data-hovercard-url="/rust-lang/rust/pull/118391/hovercard" gt;Add the lt;code gt;redundant_lifetimes lt;/code gt; lint to detect lifetimes which are semantically redundant. lt;/a gt; lt;/li gt;.
lt;li gt; lt;a href="https://github.com/rust-lang/rust/pull/120144/" data-hovercard-type="pull_request" data-hovercard-url="/rust-lang/rust/pull/120144/hovercard" gt;Stabilize the lt;code gt;unnameable_types lt;/code gt; lint for public types that can't be named. lt;/a gt; lt;/li gt;.
lt;li gt; lt;a href="https://github.com/rust-lang/rust/pull/120845/" data-hovercard-type="pull_request" data-hovercard-url="/rust-lang/rust/pull/120845/hovercard" gt;Enable deinfo in macros, and stabilize lt;code gt;-C collapse-macro-deinfo lt;/code gt; and lt;code gt;# collapse_deinfo lt;/code gt;. lt;/a gt; lt;/li gt;.
lt;li gt; lt;a href="https://github.com/rust-lang/rust/pull/121346/" data-hovercard-type="pull_request" data-hovercard-url="/rust-lang/rust/pull/121346/hovercard" gt;Propagate temporary li
1.78.003 May 2024 21:45
minor feature:
lt;p gt; lt;a id="user-content-1.78.0-Language" gt; lt;/a gt; lt;/p gt;.
lt;h2 gt;Language lt;/h2 gt;.
lt;ul gt;.
lt;li gt; lt;a href="https://github.com/rust-lang/rust/pull/119590/" data-hovercard-type="pull_request" data-hovercard-url="/rust-lang/rust/pull/119590/hovercard" gt;Stabilize lt;code gt;# cfg(target_abi =...) lt;/code gt; lt;/a gt; lt;/li gt;.
lt;li gt; lt;a href="https://github.com/rust-lang/rust/pull/119888/" data-hovercard-type="pull_request" data-hovercard-url="/rust-lang/rust/pull/119888/hovercard" gt;Stabilize the lt;code gt;# diagnostic lt;/code gt; namespace and lt;code gt;# diagnostic::on_unimplemented lt;/code gt; attribute lt;/a gt; lt;/li gt;.
lt;li gt; lt;a href="https://github.com/rust-lang/rust/pull/120103/" data-hovercard-type="pull_request" data-hovercard-url="/rust-lang/rust/pull/120103/hovercard" gt;Make async-fn-in-trait implementable with concrete signatures lt;/a gt; lt;/li gt;.
lt;li gt; lt;a href="https://github.com/rust-lang/rust/pull/116284/" data-hovercard-type="pull_request" data-hovercard-url="/rust-lang/rust/pull/116284/hovercard" gt;Make matching on NaN a hard error, and remove the rest of lt;code gt;illegal_floating_point_literal_pattern lt;/code gt; lt;/a gt; lt;/li gt;.
lt;li gt; lt;a href="https://github.com/rust-lang/rust/pull/117614/" data-hovercard-type="pull_request" data-hovercard-url="/rust-lang/rust/pull/117614/hovercard" gt;static mut: allow mutable reference to arbitrary types, not just slices and arrays lt;/a gt; lt;/li gt;.
lt;li gt; lt;a href="https://github.com/rust-lang/rust/pull/118983/" data-hovercard-type="pull_request" data-hovercard-url="/rust-lang/rust/pull/118983/hovercard" gt;Extend lt;code gt;invalid_reference_casting lt;/code gt; to include references casting to bigger memory layout lt;/a gt; lt;/li gt;.
lt;li gt; lt;a href="https://github.com/rust-lang/rust/pull/118879/" data-hovercard-type="pull_request" data-hovercard-url="/rust-lang/rust/pull/118879/hovercard" gt;Add lt;code gt;non_con
1.77.210 Apr 2024 21:25
minor feature:
lt;p gt; lt;a id="user-content-1.77.2" gt; lt;/a gt; lt;/p gt;.
lt;ul gt;.
lt;li gt; lt;a href="https://blog.rust-lang.org/2024/04/09/cve-2024-24576.html" rel="nofollow" gt;CVE-2024-24576: escaping of Windows batch file arguments in lt;code gt;std::process::Command lt;/code gt; lt;/a gt; lt;/li gt;.
lt;/ul gt;.
1.77.130 Mar 2024 17:45
minor feature:
lt;p gt; lt;a id="user-content-1.77.1" gt; lt;/a gt; lt;/p gt;.
lt;ul gt;.
lt;li gt; lt;a href="https://github.com/rust-lang/cargo/pull/13654" data-hovercard-type="pull_request" data-hovercard-url="/rust-lang/cargo/pull/13654/hovercard" gt;Revert stripping deinfo by default for Windows lt;/a gt; This a regression in 1.77 by reverting to the previous default. Platforms other than Windows are not affected. lt;/li gt;.
lt;li gt;Internal: lt;a href="https://github.com/rust-lang/rust/pull/122693" data-hovercard-type="pull_request" data-hovercard-url="/rust-lang/rust/pull/122693/hovercard" gt;heading anchor rendering in doc pages lt;/a gt; lt;/li gt;.
lt;/ul gt;.
1.77.022 Mar 2024 03:15
minor feature:
lt;p gt; lt;a id="user-content-1.77.0-Language" gt; lt;/a gt; lt;/p gt;.
lt;h2 gt;Language lt;/h2 gt;.
lt;ul gt;.
lt;li gt; lt;a href="https://github.com/rust-lang/rust/pull/116821/" data-hovercard-type="pull_request" data-hovercard-url="/rust-lang/rust/pull/116821/hovercard" gt;Reveal opaque types within the defining body for exhaustiveness checking. lt;/a gt; lt;/li gt;.
lt;li gt; lt;a href="https://github.com/rust-lang/rust/pull/117472/" data-hovercard-type="pull_request" data-hovercard-url="/rust-lang/rust/pull/117472/hovercard" gt;Stabilize C-string literals. lt;/a gt; lt;/li gt;.
lt;li gt; lt;a href="https://github.com/rust-lang/rust/pull/117673/" data-hovercard-type="pull_request" data-hovercard-url="/rust-lang/rust/pull/117673/hovercard" gt;Stabilize THIR unsafeck. lt;/a gt; lt;/li gt;.
lt;li gt; lt;a href="https://github.com/rust-lang/rust/pull/117556/" data-hovercard-type="pull_request" data-hovercard-url="/rust-lang/rust/pull/117556/hovercard" gt;Add lint lt;code gt;static_mut_refs lt;/code gt; to warn on references to mutable statics. lt;/a gt; lt;/li gt;.
lt;li gt; lt;a href="https://github.com/rust-lang/rust/pull/117703/" data-hovercard-type="pull_request" data-hovercard-url="/rust-lang/rust/pull/117703/hovercard" gt;Support async recursive calls (as long as they have indirection). lt;/a gt; lt;/li gt;.
lt;li gt; lt;a href="https://github.com/rust-lang/rust/pull/118639/" data-hovercard-type="pull_request" data-hovercard-url="/rust-lang/rust/pull/118639/hovercard" gt;Undeprecate lint lt;code gt;unstable_features lt;/code gt; and make use of it in the compiler. lt;/a gt; lt;/li gt;.
lt;li gt; lt;a href="https://github.com/rust-lang/rust/pull/118649/" data-hovercard-type="pull_request" data-hovercard-url="/rust-lang/rust/pull/118649/hovercard" gt;Make inductive cycles in coherence ambiguous always. lt;/a gt; lt;/li gt;.
lt;li gt; lt;a href="https://github.com/rust-lang/rust/pull/119044/" data-hovercard-type="pull_request" data-hovercard-url="/rust-lang/
1.76.018 Mar 2024 12:23
major feature:
Language
Document Rust ABI compatibility between various types
Also: guarantee that char and u32 are ABI-compatible
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
1.0.015 May 2015 20:25
major feature:
Around 1500 changes, numerous bugfixes.
Highlights:
The vast majority of the standard library is now stable. It is no longer possible to use unstable features with a stable build of the compiler.
Many popular crates on crates.io now work on the stable release channel.
Arithmetic on basic integer types now checks for overflow in debug builds.
Language:
Several restrictions have been added to trait coherence in order to make it easier for upstream authors to change traits without breaking downsteam code.
Digits of binary and octal literals are lexed more eagerly to improve error messages and macro behavior. For example, 0b1234 is now lexed as 0b1234 instead of two tokens, 0b1 and 234 .
Trait bounds are always invariant, eleminating the need for the PhantomFn and MarkerTrait lang items, which have been removed.
"-" is no longer a valid character in crate names, the extern crate "foo" as bar syntax has been replaced with extern crate foo as bar , and Cargo now automatically translates "-" in package names to underscore for the crate name.
Lifetime shadowing is an error.
Send no longer implies 'static .
UFCS now supports trait-less associated paths like MyType::default() .
Primitive types now have inherent methods, obviating the need for extension traits like SliceExt .
Methods with Self: Sized in their where clause are considered object-safe, allowing many extension traits like IteratorExt to be merged into the traits they extended.
You can now refer to associated types whose corresponding trait bounds appear only in a where clause.
The final bits of OIBIT landed, meaning that traits like Send and Sync are now library-defined.
A Reflect trait was introduced, which means that downcasting via the Any trait is effectively limited to concrete types. This helps retain the potentially-important "parametricity" property: generic code cannot behave differently for different type arguments except in minor ways.
The unsafe_destructor feature is
0.12.014 Oct 2014 22:05
major feature:
The introductory documentation (now called The Rust Guide) has been
completely rewritten, as have a number of supplementary guides.
Rust's package manager, Cargo, continues to improve and is sometimes
considered to be quite awesome.
Many API's in std have been reviewed and updated for consistency with the
in-development Rust coding guidelines. The standard library documentation
tracks stabilization progress.
Minor libraries have been moved out-of-tree to the rust-lang org on GitHub:
uuid, semver, glob, num, hexfloat, fourcc. They can be installed with Cargo.
Lifetime elision allows lifetime annotations to be left off of function
declarations in many common scenarios.
Rust now works on 64-bit Windows.