Rust is a multi-paradigm, general-purpose programming language. Rust emphasizes performance, type safety, and concurrency.[12][13][14][15][16] Rust is the first language to enforce memory safety — that is, that all references point to valid memory — without requiring the use of a garbage collector or reference counting like other memory-safe languages.[17][18] To simultaneously enforce memory safety and prevent concurrent data races, Rust's borrow checker tracks the object lifetime and variable scope of all references in a program during compilation.[19] Rust is popular for systems programming[20] and low-level memory management,[21] but also offers high-level features including functional programming constructs.

Software developer Graydon Hoare designed Rust while working at Mozilla Research in 2006-2011,[22] with contributions from Dave Herman, Brendan Eich, and others.[23][24] Mozilla officially sponsored the project in 2009, and the designers refined the language while writing the Servo experimental browser engine[25] and the Rust compiler. Rust's major influences include C++, OCaml, Haskell, and Erlang.[5] Since the first stable release in January 2014, Rust has been adopted by companies including Amazon,[26][27] Discord,[28] Dropbox,[29] Facebook (Meta),[30] Google (Alphabet),[31][32] and Microsoft.[33][34]

Rust has been noted for its growth as a newer language[15][35] and has been the subject of academic programming languages research.[36][37][38][16] Rust has been voted the "most loved programming language" in the Stack Overflow Developer Survey every year between 2016 and 2022 (inclusive),[note 4] and was used by 9% of the respondents in 2022.[39]

History

Early origins (2006-2012)

Mozilla Foundation headquarters in Mountain View, California, US

Rust grew out of a personal project begun in 2006 by Mozilla employee Graydon Hoare.[14] During the same year, work had shifted from the initial compiler written in OCaml to an LLVM-based self-hosting compiler written in Rust.[40]

Mozilla began sponsoring the project in 2009[14] and announced the project in 2010.[41][42] Shortly after, the Rust compiler, named rustc, successfully compiled itself in 2011.[43]

On Internet Relay Chat, Hoare has stated that Rust got its name in part from rust fungi and as a subsequence of "robust".[44]

The first numbered pre-alpha version of the Rust compiler, Rust 0.1, was released in January 2012.[45]

Evolution (2013-2014)

The object system changed considerably between versions 0.2, 0.3, and 0.4 of Rust. Version 0.2 introduced classes for the first time,[46] and version 0.3 added destructors and polymorphism through the use of interfaces.[47] In Rust 0.4, traits were added as a means to provide inheritance; interfaces were unified with traits and removed as a separate feature. Classes were also removed and replaced by a combination of implementations and structured types.[48]

Along with conventional static typing, before version 0.4, Rust also supported typestates. The typestate system modeled assertions before and after program statements through use of a special check statement. Discrepancies could be discovered at compile time rather than at runtime as with assertions in C or C++ code. Typestates were removed because they were little used,[49] though the same functionality can be achieved by leveraging Rust's move semantics.[50]

In January 2014, before the first stable release, Rust 1.0, the editor-in-chief of Dr. Dobb's, Andrew Binstock, commented on Rust's chances of becoming a competitor to C++ and to the other up-and-coming languages D, Go, and Nim (then Nimrod). According to Binstock, while Rust was "widely viewed as a remarkably elegant language", adoption slowed because it repeatedly changed between versions.[51]

Rust 1.0 (2015-2019)

Rust 1.0, the first stable version, was released on May 15, 2015.[52][53]

Layoffs and Rust Foundation (2020-present)

In August 2020, Mozilla laid off 250 of its 1,000 employees worldwide as part of a corporate restructuring caused by the long-term impact of the COVID-19 pandemic.[54][55] The team behind Servo, a browser engine written in Rust, was completely disbanded. The event raised concerns about the future of Rust, as some members of the team were active contributors to Rust.[56]

In the following week, the Rust Core Team acknowledged the severe impact of the layoffs and announced that plans for a Rust foundation were underway. The first goal of the foundation would be to take ownership of all trademarks and domain names, and take financial responsibility for their costs.[57]

On February 8, 2021, the formation of the Rust Foundation was officially announced by its five founding companies (AWS, Huawei, Google, Microsoft, and Mozilla).[58][59]

On April 6, 2021, Google announced support for Rust within Android Open Source Project as an alternative to C/C++.[60]

Syntax and semantics

Hello, World program

Below is a "Hello, World!" program in Rust. The println! macro prints the message to standard output.

fn main() {
    println!("Hello, World!");
}

Control flow

The syntax of Rust is similar to C and C++, with blocks of code delimited by curly brackets, and control flow keywords such as if, else, while, and for. Rust also includes pattern matching and value destructuring inspired by the ML language family.

fn main() {
    let mut values = vec![1, 2, 3, 4];

    for value in &values {
        println!("value = {}", value);
    }

    if values.len() > 5 {
        println!("List is longer than five items");
    }

    // Pattern matching
    match values.len() {
        0 => println!("Empty"),
        1 => println!("One value"),
        2..=10 => println!("Between two and ten values"),
        11 => println!("Eleven values"),
        _ => println!("Many values"),
    };

    // while loop with predicate and pattern matching using let
    while let Some(value) = values.pop() {
        println!("value = {}", value);
    }
}

Expression blocks

Despite the syntactic resemblance to C and C++, the semantics of Rust are closer to that of the ML family of languages and the Haskell language. For example, nearly every part of a function body is an expression,[61][62] even control flow operators. The ordinary if expression also takes the place of C's ternary conditional, an idiom used by ALGOL 60. As in Lisp, a function does not need to end with a return expression: if the semicolon is omitted, the last expression in the function will be used as the return value, as seen in the following recursive implementation of the factorial function:

fn factorial(i: u64) -> u64 {
    if i == 0 {
        1
    } else {
        i * factorial(i - 1)
    }
}

The following iterative implementation uses the ..= operator to create an inclusive range:

fn factorial(i: u64) -> u64 {
    (2..=i).product()
}

Types

Rust is strongly typed and statically typed, where all types of variables must be known during compilation, and assigning a value of a different type to a variable will result in compilation error.

Unlike other languages, Rust does not use null pointers to indicate a lack of data, as doing so can lead to accidental dereferencing. Therefore, in order to uphold its safety guarantees, null pointers cannot be dereferenced unless explicitly declaring the code block unsafe with an unsafe block.[64] Rust instead uses a Haskell-like Option type, which has two variants, Some(T) (which indicates that a value is present) and None (analogous to the null pointer).[65] Option implements a "null pointer optimization" avoiding any overhead for types which cannot have a null value (references or the NonZero types for example).[66] Option values must be handled using syntactic sugar such as the if let construction in order to access the inner value (in this case, a string):

fn main() {
    let name: Option<String> = None;
    // If name was not None, it would print here.
    if let Some(name) = name {
        println!("{}", name);
    }
}

Generics

More advanced features in Rust include the use of generic functions to achieve type polymorphism. The following is a Rust program to calculate the sum of two things, for which addition is implemented, using a generic function:

use std::ops::Add;

// sum is a generic function with one type parameter, T
fn sum<T>(num1: T, num2: T) -> T
where   
    T: Add<Output = T>,  // T must implement the Add trait where addition returns another T
{
    num1 + num2  // num1 + num2 is syntactic sugar for num1.add(num2) provided by the Add trait
}

fn main() {
    let result1 = sum(10, 20);
    println!("Sum is: {}", result1); // Sum is: 30

    let result2 = sum(10.23, 20.45);
    println!("Sum is: {}", result2); // Sum is: 30.68
}

Generics in Rust use trait bounds for their generic parameters, which precisely define what is required of a type in order to be used with a given generic function. This allows generics in Rust to be type-checked without having to substitute concrete types. Unlike C++ templates, substitution failure cannot occur.

Ownership and lifetimes

Rust uses an ownership system, where each value has a unique owner. Values are moved between different owners through assignment or passing a value as a function parameter. Functions taking ownership of a parameter are said to consume the value in question. Ownership in Rust is similar to move semantics in C++, however, unlike C++, the compiler keeps track of moved values and all types are movable by default. This means that types in Rust do not have to implement an "empty" or "invalid" state (and corresponding runtime checks) to signify that a value has been moved out of, because using a moved value is a compile-time error in Rust:

fn print_string(s: String) {
    println!("{}", s);
}

fn main() {
    let s = String::from("Hello, World");
    print_string(s);  // s consumed by print_string
    // s has been moved, so cannot be used any more
    // another print_string(s);  would result in a compile error
}

Lifetimes are a usually implicit part of all reference types in Rust. Each particular lifetime encompasses a set of locations in the code; a lifetime is said to outlive another if it is valid in at least all locations of the latter. The borrow checker in the Rust compiler checks that for all references used, the values referred to outlive the reference. It also ensures that a mutable reference only exists if no immutable references exist at the same time ("alias-xor-mutable").

Rust defines the relationship between the lifetimes of the objects used and created by functions as part of their signature using lifetime parameters. In languages like C or C++ the information about which objects have to outlive others is informally specified in documentation or comments, if at all, and cannot be checked by the compiler.

The example below parses some configuration options from a string and creates a struct containing the options. The struct only contains references to the data, so for the struct to remain valid, the data referred to by the struct needs to be valid as well. The function signature for "parse_config" specifies this relationship explicitly. In this example, the explicit lifetimes are unnecessary in newer Rust versions due to lifetime elision, which is an algorithm that automatically assigns lifetimes to functions if they are trivial.

use std::collections::HashMap;

#[derive(Debug)]
// This struct has one lifetime parameter, 'src. The name is only used within the struct's definition.
struct Config<'src> {
    hostname: &'src str,
    username: &'src str,
}

// This function also has a lifetime parameter, 'cfg. 'cfg is attached to the "config" parameter, which
// establishes that the data in "config" lives at least as long as the 'cfg lifetime.
// The returned struct also uses 'cfg for it's lifetime, so it can live at most as long as 'cfg.
fn parse_config<'cfg>(config: &'cfg str) -> Config<'cfg> {
    let key_values: HashMap<_, _> = config
        .lines()
        .filter(|line| !line.starts_with('#'))
        .filter_map(|line| line.split_once('='))
        .map(|(key, value)| (key.trim(), value.trim()))
        .collect();
    Config {
        hostname: key_values["hostname"],
        username: key_values["username"],
    }
}

fn main() {
    let config = parse_config(
        r#"hostname = foobar
username=barfoo"#,
    );
    println!("Parsed config: {:#?}", config);
}

Features

A presentation on Rust by Emily Dunham from Mozilla's Rust team (linux.conf.au conference, Hobart, 2017)

Rust intends to be a language for highly concurrent and highly safe systems,[67] which has inspired a feature set with an emphasis on safety, control of memory layout, and concurrency.

Memory safety

Rust is designed to be memory safe. It does not permit null pointers, dangling pointers, or data races.[68][69][70] Data values can be initialized only through a fixed set of forms, all of which require their inputs to be already initialized.[71] To replicate pointers being either valid or NULL, such as in linked list or binary tree data structures, the Rust core library provides an option type, which can be used to test whether a pointer has Some value or None.[69] Rust has added syntax to manage lifetimes, which are checked at compile time by the borrow checker. Unsafe code can subvert some of these restrictions using the unsafe keyword.[19]

Memory management

Rust does not use automated garbage collection. Memory and other resources are managed through the resource acquisition is initialization convention,[72] with optional reference counting. Rust provides deterministic management of resources, with very low overhead.[73] Values are allocated on the stack by default and all dynamic allocations must be explicit.[74]

There is the concept of references (using the & symbol), which does not involve run-time reference counting. The safety of such pointers is verified at compile time, preventing dangling pointers and other forms of undefined behavior. Rust's type system separates shared, immutable references of the form &T from unique, mutable references of the form &mut T. A mutable reference can be coerced to an immutable reference, but not vice versa.

Ownership

Rust has an ownership system where all values have a unique owner, and the scope of the value is the same as the scope of the owner.[75][76] Values can be passed by immutable reference, using &T, by mutable reference, using &mut T, or by value, using T. At all times, there can either be multiple immutable references or one mutable reference (obviating the need for a readers–writer lock). The Rust compiler enforces these rules at compile time and also checks that all references are valid.

Types and polymorphism

Rust's type system supports a mechanism called traits, inspired by type classes in the Haskell language. Traits annotate types and are used to define shared behavior between different types. For example, floats and integers both implement the Add trait because they can both be added; and any type that can be printed out as a string implements the Display or Debug traits. This facility is known as ad hoc polymorphism.

Rust uses type inference for variables declared with the keyword let. Such variables do not require a value to be initially assigned to determine their type. A compile time error results if any branch of code leaves the variable without an assignment.[77] Variables assigned multiple times must be marked with the keyword mut (short for mutable).

A function can be given generic parameters, which allows the same function to be applied to different types. Generic functions can constrain the generic type to implement a particular trait or traits; for example, an "add one" function might require the type to implement "Add". This means that a generic function can be type-checked as soon as it is defined.

The implementation of Rust generics is similar to the typical implementation of C++ templates: a separate copy of the code is generated for each instantiation. This is called monomorphization and contrasts with the type erasure scheme typically used in Java and Haskell. Rust's type erasure is also available by using the keyword dyn (short for dynamic) .The benefit of monomorphization is optimized code for each specific use case; the drawback is increased compile time and size of the resulting binaries.

In Rust, user-defined types are created with the struct or enum keywords. The struct type shares similarities C++ structs. The enum type shares similarities with the Haskell data keyword. These types usually contain fields of data like objects or classes in other languages. The impl keyword can define methods for the types (data and functions are defined separately) or implement a trait for the types. A trait is a contract that a structure has certain required methods implemented. Traits are used to restrict generic parameters and because traits can provide a struct with more methods than the user defined. For example, the trait Iterator requires that the next method be defined for the type. Once the next method is defined the trait provides common functional helper methods over the iterator like map or filter.

Type aliases, including generic arguments, can also be defined with the type keyword.

The object system within Rust is based around implementations, traits and structured types. Implementations fulfill a role similar to that of classes within other languages and are defined with the keyword impl. Traits provide inheritance and polymorphism; they allow methods to be defined and mixed in to implementations. Structured types are used to define fields. Implementations and traits cannot define fields themselves, and only traits can provide inheritance. Among other benefits, this prevents the diamond problem of multiple inheritance, as in C++. In other words, Rust supports interface inheritance but replaces implementation inheritance with composition; see composition over inheritance.

Macros for language extension

It is possible to extend the Rust language using the procedural macro mechanism.[78]

Procedural macros use Rust functions that are compiled before other components to run and modify the compiler's input token stream. This complements the declarative macro mechanism (also known as macros by example), which uses pattern matching to achieve similar goals.

Procedural macros come in three flavors:

  • Function-like macros custom!(...)
  • Derive macros #[derive(CustomDerive)]
  • Attribute macros #[custom_attribute]

The println! macro is an example of a function-like macro and serde_derive[79] is a commonly used library for generating code for reading and writing data in many formats such as JSON. Attribute macros are commonly used for language bindings such as the extendr library for Rust bindings to R.[80]

The following code shows the use of the Serialize, Deserialize and Debug derive procedural macros to implement JSON reading and writing as well as the ability to format a structure for debugging.

use serde_json::{Serialize, Deserialize};

#[derive(Serialize, Deserialize, Debug)]
struct Point {
    x: i32,
    y: i32,
}

fn main() {
    let point = Point { x: 1, y: 2 };

    let serialized = serde_json::to_string(&point).unwrap();
    println!("serialized = {}", serialized);

    let deserialized: Point = serde_json::from_str(&serialized).unwrap();
    println!("deserialized = {:?}", deserialized);
}

Interface with C and C++

Rust has a foreign function interface (FFI) that can be used both to call code written in languages such as C from Rust and to call Rust code from those languages. Rust also has a library, CXX, for calling to or from C++.[81]

Components

Compiling a Rust program with Cargo

Besides the compiler and standard library, the Rust ecosystem includes additional components for software development. Component installation is typically managed by rustup, a Rust toolchain installer developed by the Rust project.[82]

Cargo

Screenshot of crates.io in June 2022

Cargo is Rust's build system and package manager. Cargo downloads, compiles, distributes, and uploads packages, called crates,[83] maintained in the official registry.[84] Cargo also acts as a front-end for Clippy and other Rust components.

Cargo requires projects to follow a certain directory structure, with some flexibility.[85] Projects using Cargo may be either a single crate or a workspace composed of multiple crates that may depend on each other.[86]

The dependencies for a crate are specified in a Cargo.toml file along with version requirements in the format of Semantic Versioning (SemVer), telling Cargo which versions of the dependency are compatible with the crate using them.[87] By default, Cargo sources its dependencies from the user-contributed registry crates.io, but Git repositories and crates in the local filesystem and other external sources can be specified as dependencies, too.[88]

Rustfmt

Rustfmt is a code formatter for Rust. It takes Rust source code as input and changes the whitespace and indentation to produce code formatted in accordance to the Rust style guide or rules specified in a rustfmt.toml file. Rustfmt can be invoked as a standalone program or on a Rust project through Cargo.[89][90]

Clippy

Example output of Clippy on a hello world Rust program

Clippy is Rust's built-in linting tool to improve the correctness, performance, and readability of Rust code. It was created in 2014[91] and named after the eponymous Microsoft Office feature.[92] As of 2021, Clippy has more than 450 rules,[93] which can be browsed online and filtered by category.[94] Some rules are disabled by default.

Versioning system

Following Rust 1.0, new features are developed in nightly versions which release on a daily basis. During each release cycle of six weeks, changes on nightly versions are released to beta, while changes from the previous beta version are released to a new stable version.[95][96]

Every three years, a new "edition" is produced. Editions are released to provide an easy reference point for changes due to the frequent nature of Rust's train release schedule, and to provide a window to make limited breaking changes. Editions are largely compatible and migration to a new edition is trivialized with automated tooling.[97]

IDE support

The most popular language servers for Rust are rust-analyzer[98] and RLS.[99] These projects provide IDEs and text editors with more information about a Rust project. Basic features include linting checks via Clippy and formatting via Rustfmt, among other functions. RLS also provides automatic code completion via Racer, though development of Racer was slowed down in favor of rust-analyzer.[100]

Performance

Rust aims "to be as efficient and portable as idiomatic C++, without sacrificing safety".[101] Since Rust utilizes LLVM, any performance improvements in LLVM also carry over to Rust.[102]

Adoption

Rust has been adopted for components at a number of major software companies, including Amazon,[27] Cloudflare,[103][104] Discord,[28] Dropbox, Facebook,[105] Microsoft, and the Mozilla Foundation. Rust was the third-most-loved programming language in the 2015 Stack Overflow annual survey[106] and took first place for 2016–2022.[39]

Web browsers and services

Early homepage of Mozilla's Servo browser engine

Operating systems

Exa, a command-line alternative to ls written in Rust
  • Redox is a "full-blown Unix-like operating system" including a microkernel written in Rust.[114]
  • Theseus, an experimental OS with "intralingual design", is written in Rust.[115]
  • The Google Fuchsia capability-based operating system has components written in Rust,[116] including a TCP/IP library. [117]
  • Stratis is a file system manager written in Rust for Fedora[118] and RHEL 8.[119]
  • exa is a Unix/Linux command line alternative to ls written in Rust.
  • Since 2021, there is a patch series for adding Rust support to the Linux kernel.[120]

Other notable projects and platforms

Ruffle, a web emulator for Adobe Flash SWF files

Community

A bright orange crab icon
Some Rust users refer to themselves as Rustaceans (a pun on crustacean) and use Ferris (the orange crab above) as their unofficial mascot.[127]

Conferences

Rust's official website lists online forums, messaging platforms, and in-person meetups for the Rust community.[128] Conferences dedicated to Rust development include:

Rust Foundation

The Rust Foundation is a non-profit membership organization incorporated in Delaware, United States, with the primary purposes of supporting the maintenance and development of the language, cultivating the Rust project team members and user communities, managing the technical infrastructure underlying the development of Rust, and managing and stewarding the Rust trademark.

It was established on February 8, 2021, with five founding corporate members (Amazon Web Services, Huawei, Google, Microsoft, and Mozilla).[135] The foundation's board is chaired by Shane Miller.[136] Starting in late 2021, its Executive Director and CEO is Rebecca Rumbul.[137] Prior to this, Ashley Williams was interim executive director.[138]

Governance teams

The Rust project is composed of teams that are responsible for different subareas of the development. For example, the Core team is responsible for "Managing the overall direction of Rust, subteam leadership, and any cross-cutting issues," the Compiler team is responsible for "Developing and managing compiler internals and optimizations," and the Language team is responsible for "Designing and helping to implement new language features," according to the official website.[139]

See also

Explanatory notes

  1. ^ The list is incomplete; the degree of standard library support varies.
  2. ^ Host build tools on Haiku, Android, Redox, iOS, and Fuchsia are not officially shipped; these operating systems are supported as targets.
  3. ^ For a complete list, see[5]
  4. ^ "Most loved" means Rust has the largest percentage of respondents who have done "extensive development work [with Rust] in over the past year", where they have also expressed interest to "work in [Rust] over the next year."

References

  1. ^ "Announcing Rust 1.61.0".
  2. ^ "Note Research: Type System". GitHub. February 1, 2015. Archived from the original on February 17, 2019. Retrieved March 25, 2015.
  3. ^ "RFC for 'if let' expression". GitHub. Archived from the original on March 4, 2016. Retrieved December 4, 2014.
  4. ^ a b "The Rust Reference: Appendix: Influences". Archived from the original on January 26, 2019. Retrieved November 11, 2018.
  5. ^ "Command Optimizations?". June 26, 2014. Archived from the original on July 10, 2019. Retrieved December 10, 2014.
  6. ^ "Idris – Uniqueness Types". Archived from the original on November 21, 2018. Retrieved November 20, 2018.
  7. ^ Jaloyan, Georges-Axel (October 19, 2017). "Safe Pointers in SPARK 2014". arXiv:1710.07047. Bibcode:2017arXiv171007047J. Archived from the original on February 2, 2022. Retrieved February 2, 2022.
  8. ^ Lattner, Chris. "Chris Lattner's Homepage". Nondot.org. Archived from the original on December 25, 2018. Retrieved May 14, 2019.
  9. ^ "Microsoft opens up Rust-inspired Project Verona programming language on GitHub". ZDNet. Archived from the original on January 17, 2020. Retrieved January 17, 2020.
  10. ^ "PHP RFC: Shorter Attribute Syntax". June 3, 2020. Archived from the original on March 7, 2021. Retrieved March 17, 2021.
  11. ^ Quentin, Ochem. "Rust and SPARK: Software Reliability for Everyone". Electronic Design. Retrieved June 22, 2022.
  12. ^ Hoare, Graydon (December 28, 2016). "Rust is mostly safety". Graydon2. Dreamwidth Studios. Archived from the original on May 2, 2019. Retrieved May 13, 2019.
  13. ^ a b c "FAQ – The Rust Project". Rust-lang.org. Archived from the original on June 9, 2016. Retrieved June 27, 2019.
  14. ^ a b Perkel, Jeffrey M. (December 1, 2020). "Why scientists are turning to Rust". Nature. 588 (7836): 185–186. doi:10.1038/d41586-020-03382-2. Archived from the original on May 6, 2022. Retrieved May 15, 2022.
  15. ^ a b Balasubramanian, Abhiram; Baranowski, Marek S.; Burtsev, Anton; Panda, Aurojit; Rakamarić, Zvonimir; Ryzhyk, Leonid (May 7, 2017). "System Programming in Rust: Beyond Safety". Proceedings of the 16th Workshop on Hot Topics in Operating Systems. HotOS '17. New York, NY, USA: Association for Computing Machinery: 156–161. doi:10.1145/3102980.3103006. ISBN 978-1-4503-5068-6. Archived from the original on June 11, 2022. Retrieved June 1, 2022.
  16. ^ "Fearless Security: Memory Safety". Archived from the original on November 8, 2020. Retrieved November 4, 2020.
  17. ^ "Rc<T>, the Reference Counted Smart Pointer". Archived from the original on November 11, 2020. Retrieved November 4, 2020.
  18. ^ a b "Unsafe Rust". Archived from the original on October 14, 2020. Retrieved October 17, 2020.
  19. ^ "Foreword - The Rust Programming Language". Archived from the original on April 13, 2022. Retrieved April 21, 2022.
  20. ^ "What Unsafe Can Do - The Rustonomicon". doc.rust-lang.org. Archived from the original on April 10, 2022. Retrieved April 21, 2022.
  21. ^ "Rust language". Archived from the original on September 6, 2020. Retrieved September 9, 2020. Mozilla was the first investor for Rust and continues to sponsor the work of the open source project. Mozilla also utilizes Rust in many of its core initiatives including Servo and key parts of Firefox.
  22. ^ Noel (July 8, 2010). "The Rust Language". Lambda the Ultimate. Archived from the original on November 23, 2012. Retrieved October 30, 2010.
  23. ^ "Contributors to rust-lang/rust". GitHub. Archived from the original on May 26, 2020. Retrieved October 12, 2018.
  24. ^ Bright, Peter (April 3, 2013). "Samsung teams up with Mozilla to build browser engine for multicore machines". Ars Technica. Archived from the original on December 16, 2016. Retrieved April 4, 2013.
  25. ^ "Why AWS loves Rust, and how we'd like to help". Amazon Web Services. November 24, 2020. Archived from the original on December 3, 2020. Retrieved April 21, 2022.
  26. ^ a b "How our AWS Rust team will contribute to Rust's future successes". Amazon Web Services. March 3, 2021. Archived from the original on January 2, 2022. Retrieved January 2, 2022.
  27. ^ a b c Howarth, Jesse (February 4, 2020). "Why Discord is switching from Go to Rust". Archived from the original on June 30, 2020. Retrieved April 14, 2020.
  28. ^ The Dropbox Capture Team. "Why we built a custom Rust library for Capture". Dropbox.Tech. Archived from the original on April 6, 2022. Retrieved April 21, 2022.
  29. ^ "A brief history of Rust at Facebook". Engineering at Meta. April 29, 2021. Archived from the original on January 19, 2022. Retrieved April 21, 2022.
  30. ^ Amadeo, Ron (April 7, 2021). "Google is now writing low-level Android code in Rust". Ars Technica. Archived from the original on April 8, 2021. Retrieved April 21, 2022.
  31. ^ "Rust in the Android platform". Google Online Security Blog. Archived from the original on April 3, 2022. Retrieved April 21, 2022.
  32. ^ "Why Rust for safe systems programming". Microsoft Security Response Center. Archived from the original on July 22, 2019. Retrieved April 21, 2022.
  33. ^ Tung, Liam. "Microsoft: Why we used programming language Rust over Go for WebAssembly on Kubernetes app". ZDNet. Archived from the original on April 21, 2022. Retrieved April 21, 2022.
  34. ^ "Rust | TIOBE - The Software Quality Company". www.tiobe.com. Archived from the original on March 3, 2022. Retrieved May 15, 2022.
  35. ^ "Computer Scientist proves safety claims of the programming language Rust". EurekAlert!. Archived from the original on February 24, 2022. Retrieved May 15, 2022.
  36. ^ Jung, Ralf; Jourdan, Jacques-Henri; Krebbers, Robbert; Dreyer, Derek (December 27, 2017). "RustBelt: securing the foundations of the Rust programming language". Proceedings of the ACM on Programming Languages. 2 (POPL): 66:1–66:34. doi:10.1145/3158154. Archived from the original on June 11, 2022. Retrieved May 15, 2022.
  37. ^ Jung, Ralf (2020). "Understanding and evolving the Rust programming language". doi:10.22028/D291-31946. Archived from the original on March 8, 2022. Retrieved May 15, 2022. {{cite journal}}: Cite journal requires |journal= (help)
  38. ^ a b "Stack Overflow Developer Survey 2022". Stack Overflow. Retrieved June 22, 2022.{{cite web}}: CS1 maint: url-status (link)
  39. ^ Hoare, Graydon (October 2, 2010). "Rust Progress". Archived from the original on August 15, 2014. Retrieved October 30, 2010.
  40. ^ "Future Tense". April 29, 2011. Archived from the original on September 18, 2012. Retrieved February 6, 2012.
  41. ^ Hoare, Graydon (July 7, 2010). Project Servo (PDF). Mozilla Annual Summit 2010. Whistler, Canada. Archived (PDF) from the original on July 11, 2017. Retrieved February 22, 2017.
  42. ^ Hoare, Graydon (April 20, 2011). "[rust-dev] stage1/rustc builds". Archived from the original on July 20, 2011. Retrieved April 20, 2011.
  43. ^ Hoare, Graydon (June 7, 2014). "Internet archaeology: the definitive, end-all source for why Rust is named "Rust"". Reddit.com. Archived from the original on July 14, 2016. Retrieved November 3, 2016.
  44. ^ Brian, Anderson (January 20, 2012). "[rust-dev] The Rust compiler 0.1 is unleashed". Archived from the original on September 5, 2014. Retrieved May 18, 2022.
  45. ^ Hoare, Graydon (March 29, 2012). "[rust-dev] Rust 0.2 released". mail.mozilla.org. Retrieved June 12, 2022.
  46. ^ Hoare, Graydon (July 12, 2012). "[rust-dev] Rust 0.3 released". mail.mozilla.org. Retrieved June 12, 2022.
  47. ^ Hoare, Graydon. "[rust-dev] Rust 0.4 released". mail.mozilla.org. Archived from the original on October 31, 2021. Retrieved October 31, 2021.
  48. ^ Walton, Patrick (December 26, 2012). "Typestate Is Dead, Long Live Typestate!". GitHub. Archived from the original on February 23, 2018. Retrieved November 3, 2016.
  49. ^ Biffle, Cliff (June 5, 2019). "The Typestate Pattern in Rust". Archived from the original on February 6, 2021. Retrieved February 1, 2021.
  50. ^ Binstock, Andrew. "The Rise And Fall of Languages in 2013". Dr Dobb's. Archived from the original on August 7, 2016. Retrieved December 11, 2015.
  51. ^ "Version History". GitHub. Archived from the original on May 15, 2015. Retrieved January 1, 2017.
  52. ^ The Rust Core Team (May 15, 2015). "Announcing Rust 1.0". Archived from the original on May 15, 2015. Retrieved December 11, 2015.
  53. ^ Cimpanu, Catalin (August 11, 2020). "Mozilla lays off 250 employees while it refocuses on commercial products". ZDNet. Archived from the original on March 18, 2022. Retrieved December 2, 2020.
  54. ^ Cooper, Daniel (August 11, 2020). "Mozilla lays off 250 employees due to the pandemic". Engadget. Archived from the original on December 13, 2020. Retrieved December 2, 2020.
  55. ^ Tung, Liam. "Programming language Rust: Mozilla job cuts have hit us badly but here's how we'll survive". ZDNet. Archived from the original on April 21, 2022. Retrieved April 21, 2022.
  56. ^ "Laying the foundation for Rust's future". Rust Blog. August 18, 2020. Archived from the original on December 2, 2020. Retrieved December 2, 2020.
  57. ^ "Hello World!". Rust Foundation. February 8, 2020. Archived from the original on April 19, 2022. Retrieved June 4, 2022.
  58. ^ "Mozilla Welcomes the Rust Foundation". Mozilla Blog. February 9, 2021. Archived from the original on February 8, 2021. Retrieved February 9, 2021.
  59. ^ Amadeo, Ron (April 7, 2021). "Google is now writing low-level Android code in Rust". Ars Technica. Archived from the original on April 8, 2021. Retrieved April 8, 2021.
  60. ^ "rust/src/grammar/parser-lalr.y". GitHub. May 23, 2017. Archived from the original on October 22, 2021. Retrieved May 23, 2017.
  61. ^ "Statements and expressions". The Rust Reference. Retrieved June 13, 2022.
  62. ^ "Textual types". The Rust Reference. Retrieved June 12, 2022.
  63. ^ "Unsafety - The Rust Reference". The Rust Reference. Archived from the original on April 23, 2022. Retrieved April 8, 2022.
  64. ^ "Option in std::option - Rust". The Rust Standard Library. Archived from the original on April 7, 2022. Retrieved April 8, 2022.
  65. ^ "Module std::option". Rust standard library documentation. Retrieved June 21, 2022.
  66. ^ Avram, Abel (August 3, 2012). "Interview on Rust, a Systems Programming Language Developed by Mozilla". InfoQ. Archived from the original on July 24, 2013. Retrieved August 17, 2013.
  67. ^ Rosenblatt, Seth (April 3, 2013). "Samsung joins Mozilla's quest for Rust". Archived from the original on April 4, 2013. Retrieved April 5, 2013.
  68. ^ a b Brown, Neil (April 17, 2013). "A taste of Rust". Archived from the original on April 26, 2013. Retrieved April 25, 2013.
  69. ^ "Races - The Rustonomicon". doc.rust-lang.org. Archived from the original on July 10, 2017. Retrieved July 3, 2017.
  70. ^ "The Rust Language FAQ". static.rust-lang.org. 2015. Archived from the original on April 20, 2015. Retrieved April 24, 2017.
  71. ^ "RAII – Rust By Example". doc.rust-lang.org. Archived from the original on April 21, 2019. Retrieved November 22, 2020.
  72. ^ "Abstraction without overhead: traits in Rust". Rust Blog. Archived from the original on September 23, 2021. Retrieved October 19, 2021.
  73. ^ "Box, stack and heap". Rust By Example. Retrieved June 13, 2022.
  74. ^ Klabnik, Steve; Nichols, Carol (June 2018). "Chapter 4: Understanding Ownership". The Rust Programming Language. San Francisco, California: No Starch Press. p. 44. ISBN 978-1-593-27828-1. Archived from the original on May 3, 2019. Retrieved May 14, 2019.
  75. ^ "The Rust Programming Language: What is Ownership". Rust-lang.org. Archived from the original on May 19, 2019. Retrieved May 14, 2019.
  76. ^ Walton, Patrick (October 1, 2010). "Rust Features I: Type Inference". Archived from the original on July 8, 2011. Retrieved January 21, 2011.
  77. ^ "Procedural Macros". The Rust Programming Language Reference. Archived from the original on November 7, 2020. Retrieved March 23, 2021.
  78. ^ "Serde Derive". Serde Derive documentation. Archived from the original on April 17, 2021. Retrieved March 23, 2021.
  79. ^ "extendr_api - Rust". Extendr Api Documentation. Archived from the original on May 25, 2021. Retrieved March 23, 2021.
  80. ^ "Safe Interoperability between Rust and C++ with CXX". InfoQ. December 6, 2020. Archived from the original on January 22, 2021. Retrieved January 3, 2021.
  81. ^ rust-lang/rustup, The Rust Programming Language, May 17, 2021, archived from the original on May 9, 2021, retrieved May 17, 2021
  82. ^ "Packages and Crates - The Rust Programming Language". doc.rust-lang.org. Archived from the original on February 4, 2022. Retrieved February 4, 2022.
  83. ^ "The Cargo Book". Archived from the original on May 15, 2021. Retrieved February 19, 2022.
  84. ^ "Why Cargo Exists". The Cargo Book. Archived from the original on April 7, 2022. Retrieved May 18, 2021.
  85. ^ "Workspaces - The Cargo Book". doc.rust-lang.org. Archived from the original on February 28, 2022. Retrieved February 28, 2022.
  86. ^ "Dependency Resolution - The Cargo Book". doc.rust-lang.org. Archived from the original on February 28, 2022. Retrieved February 28, 2022.
  87. ^ "Specifying Dependencies - The Cargo Book". doc.rust-lang.org. Archived from the original on April 7, 2022. Retrieved May 17, 2021.
  88. ^ "rust-dev-tools/fmt-rfcs". GitHub. Archived from the original on October 14, 2021. Retrieved September 21, 2021.
  89. ^ "rustfmt". GitHub. Archived from the original on May 16, 2021. Retrieved May 19, 2021.
  90. ^ "Create README.md · rust-lang/rust-clippy@507dc2b". GitHub. Archived from the original on November 22, 2021. Retrieved November 22, 2021.
  91. ^ "Day 1 - cargo subcommands | 24 days of Rust". zsiciarz.github.io. Archived from the original on April 7, 2022. Retrieved November 22, 2021.
  92. ^ "rust-lang/rust-clippy". GitHub. Archived from the original on May 23, 2021. Retrieved May 21, 2021.
  93. ^ "ALL the Clippy Lints". Archived from the original on May 22, 2021. Retrieved May 22, 2021.
  94. ^ "Scheduling the Trains". Archived from the original on January 2, 2017. Retrieved January 1, 2017.
  95. ^ "G - How Rust is Made and "Nightly Rust" - The Rust Programming Language". doc.rust-lang.org. Archived from the original on May 10, 2021. Retrieved May 22, 2021.
  96. ^ "What are editions? - The Edition Guide". doc.rust-lang.org. Archived from the original on May 14, 2021. Retrieved May 22, 2021.
  97. ^ rust-analyzer/rust-analyzer, rust-analyzer, January 2, 2022, archived from the original on January 3, 2022, retrieved January 2, 2022
  98. ^ "rust-lang/rls". GitHub. Archived from the original on May 15, 2021. Retrieved May 26, 2021.
  99. ^ "racer-rust/racer". GitHub. Archived from the original on May 26, 2021. Retrieved May 26, 2021.
  100. ^ Walton, Patrick (December 5, 2010). "C++ Design Goals in the Context of Rust". Archived from the original on December 9, 2010. Retrieved January 21, 2011.
  101. ^ "How Fast Is Rust?". The Rust Programming Language FAQ. Archived from the original on October 28, 2020. Retrieved April 11, 2019.
  102. ^ "How we made Firewall Rules". The Cloudflare Blog. March 4, 2019. Retrieved June 11, 2022.
  103. ^ "Enjoy a slice of QUIC, and Rust!". The Cloudflare Blog. January 22, 2019. Retrieved June 11, 2022.
  104. ^ "A brief history of Rust at Facebook". Engineering at Meta. April 29, 2021. Archived from the original on January 19, 2022. Retrieved January 19, 2022.
  105. ^ "Stack Overflow Developer Survey 2015". Stackoverflow.com. Archived from the original on December 31, 2016. Retrieved November 3, 2016.
  106. ^ Yegulalp, Serdar (April 3, 2015). "Mozilla's Rust-based Servo browser engine inches forward". InfoWorld. Archived from the original on March 16, 2016. Retrieved March 15, 2016.
  107. ^ Lardinois, Frederic (April 3, 2015). "Mozilla And Samsung Team Up To Develop Servo, Mozilla's Next-Gen Browser Engine For Multicore Processors". TechCrunch. Archived from the original on September 10, 2016. Retrieved June 25, 2017.
  108. ^ Bryant, David (October 27, 2016). "A Quantum Leap for the web". Medium. Archived from the original on December 9, 2020. Retrieved October 27, 2016.
  109. ^ Balbaert, Ivo (May 27, 2015). Rust Essentials. Packt Publishing. p. 6. ISBN 978-1785285769. Archived from the original on May 25, 2021. Retrieved March 21, 2016.
  110. ^ Frank, Denis (December 5, 2013). "Using HyperLogLog to Detect Malware Faster Than Ever". OpenDNS Security Labs. Archived from the original on August 14, 2017. Retrieved March 19, 2016.
  111. ^ Denis, Frank (October 4, 2013). "ZeroMQ: Helping us Block Malicious Domains in Real Time". OpenDNS Security Labs. Archived from the original on August 14, 2017. Retrieved March 19, 2016.
  112. ^ Garbutt, James (January 27, 2019). "First thoughts on Deno, the JavaScript/TypeScript run-time". 43081j.com. Archived from the original on November 7, 2020. Retrieved September 27, 2019.
  113. ^ Yegulalp, Serdar. "Rust's Redox OS could show Linux a few new tricks". infoworld. Archived from the original on March 21, 2016. Retrieved March 21, 2016.
  114. ^ "Introduction to Theseus". Theseus OS Book. Archived from the original on July 11, 2021. Retrieved July 11, 2021.
  115. ^ "Google Fushcia's source code". Google Git. Archived from the original on July 9, 2021. Retrieved July 2, 2021.
  116. ^ "src/connectivity/network/netstack3/core/src - fuchsia". Google Git. Archived from the original on June 11, 2022. Retrieved April 21, 2022.
  117. ^ Sei, Mark (October 10, 2018). "Fedora 29 new features: Startis now officially in Fedora". Marksei, Weekly sysadmin pills. Archived from the original on April 13, 2019. Retrieved May 13, 2019.
  118. ^ "RHEL 8: Chapter 8. Managing layered local storage with Stratis". October 10, 2018. Archived from the original on April 13, 2019. Retrieved April 13, 2019.
  119. ^ "rust-for-linux.vger.kernel.org archive mirror". lore.kernel.org. Archived from the original on March 8, 2022. Retrieved March 24, 2022.
  120. ^ Vishnevskiy, Stanislav (July 6, 2017). "How Discord Scaled Elixir to 5,000,000 Concurrent Users". Discord Blog. Archived from the original on April 26, 2020. Retrieved August 14, 2021.
  121. ^ Nichols, Shaun (June 27, 2018). "Microsoft's next trick? Kicking things out of the cloud to Azure IoT Edge". The Register. Archived from the original on September 27, 2019. Retrieved September 27, 2019.
  122. ^ "Ruffle". Ruffle. Archived from the original on January 26, 2021. Retrieved April 14, 2021.
  123. ^ terminusdb/terminusdb-store, TerminusDB, December 14, 2020, archived from the original on December 15, 2020, retrieved December 14, 2020
  124. ^ "Firecracker – Lightweight Virtualization for Serverless Computing". Amazon Web Services. November 26, 2018. Archived from the original on December 8, 2021. Retrieved January 2, 2022.
  125. ^ "Announcing the General Availability of Bottlerocket, an open source Linux distribution built to run containers". Amazon Web Services. August 31, 2020. Archived from the original on January 2, 2022. Retrieved January 2, 2022.
  126. ^ "Getting Started". rust-lang.org. Archived from the original on November 1, 2020. Retrieved October 11, 2020.
  127. ^ "Community". www.rust-lang.org. Archived from the original on January 3, 2022. Retrieved January 3, 2022.
  128. ^ "RustConf 2020 - Thursday, August 20". rustconf.com. Archived from the original on August 25, 2019. Retrieved August 25, 2019.
  129. ^ Rust Belt Rust. Dayton, Ohio. October 18, 2019. Archived from the original on May 14, 2019. Retrieved May 14, 2019.
  130. ^ RustFest. Barcelona, Spain: asquera Event UG. 2019. Archived from the original on April 24, 2019. Retrieved May 14, 2019.
  131. ^ "RustCon Asia 2019 – About". RustCon Asia. Archived from the original on May 9, 2021. Retrieved April 21, 2022.
  132. ^ "Rust Latam". Rust Latam. Archived from the original on April 16, 2021. Retrieved April 21, 2022.
  133. ^ "Oxidize Global". Oxidize Berlin Conference. Archived from the original on February 6, 2021. Retrieved February 1, 2021.
  134. ^ Krill, Paul. "Rust language moves to independent foundation". InfoWorld. Archived from the original on April 10, 2021. Retrieved April 10, 2021.
  135. ^ Vaughan-Nichols, Steven J. (April 9, 2021). "AWS's Shane Miller to head the newly created Rust Foundation". ZDNet. Archived from the original on April 10, 2021. Retrieved April 10, 2021.
  136. ^ Vaughan-Nichols, Steven J. (November 17, 2021). "Rust Foundation appoints Rebecca Rumbul as executive director". ZDNet. Archived from the original on November 18, 2021. Retrieved November 18, 2021.
  137. ^ "The Rust programming language now has its own independent foundation". TechRepublic. February 10, 2021. Archived from the original on November 18, 2021. Retrieved November 18, 2021.
  138. ^ "Governance". The Rust Programming Language. Archived from the original on May 10, 2022. Retrieved May 7, 2022.

Further reading

External links