PLDB
Languages Features Calendar CSV Lists Blog About Sponsor Add Language
GitHub icon

Rust

Rust

Rust is a pl created in 2010 by Graydon Hoare.

#23on PLDB 12Years Old 194.0kUsers
65Books 36Papers 357kRepos

Try now: Riju · TIO · Replit

Rust is a systems programming language sponsored by Mozilla Research, which describes it as a "safe, concurrent, practical language," supporting functional and imperative-procedural paradigms. Rust is syntactically similar to C++, but its designers intend it to provide better memory safety while maintaining performance. Rust is an open source programming language. Read more on Wikipedia...


Example from Compiler Explorer:
// Type your code here, or load an example. pub fn square(num: i32) -> i32 { num * num } // If you use `main()`, declare it as `pub` to see it in the output: // pub fn main() { ... }
Example from Riju:
fn main() { println!("Hello, world!"); }
Example from hello-world:
fn main() { println!("Hello World"); }
Example from the Hello World Collection:
// Hello world in Rust fn main() { println!("Hello World!"); }
Example from Linguist:
extern crate foo; extern crate bar; use foo::{self, quix}; use bar::car::*; use bar; fn main() { println!("Hello {}", "World"); panic!("Goodbye") }

Keywords in Rust

abstract alignof as become box break const continue crate do else enum extern false final fn for if impl in let loop macro match mod move mut offsetof override priv proc pub pure ref return Self self sizeof static struct super trait true type typeof unsafe unsized use virtual where while yield

Language features

Feature Supported Example Token
Conditionals
Constants
While Loops
Booleans true false
Line Comments
// A comment
//
Print() Debugging
println!("Hi");
println!
Pattern Matching
Operator Overloading
Macros
https://doc.rust-lang.org/book/ch19-06-macros.html
Iterators
for n in 0..42 {
  println!("{}", n);
}
File Imports
use ::std::fs;  // Imports from the `std` crate, not the module below.
use self::std::fs as self_fs;  // Imports the module below.
mod my;
use self::foo::Zoo as _;
#[path = "foo.rs"]
mod c;
Directives
// A conditionally-compiled module
#[cfg(target_os = "linux")]
mod bar {
    /* ... */
}
// General metadata applied to the enclosing module or crate.
#![crate_type = "lib"]
// A function marked as a unit test
#[test]
fn test_foo() {
    /* ... */
}
// A lint attribute used to suppress a warning/error
#[allow(non_camel_case_types)]
type int8_t = i8;

// Inner attribute applies to the entire function.
fn some_unused_variables() {
  #![allow(unused_variables)]

  let x = ();
  let y = ();
  let z = ();
}
MultiLine Comments
/* A comment
*/
/* */
Comments
// https://doc.rust-lang.org/reference/comments.html
// a comment
Strings
"hello world"
"
Semantic Indentation ϴ

Books about Rust from ISBNdb

title authors year publisher
The Rust Programming Language Klabnik, Steve and Nichols, Carol 2018 No Starch Press
Rust in Action McNamara, TS 2020 Manning Publications
Creative Projects for Rust Programmers: Build exciting projects on domains such as web apps, WebAssembly, games, and parsing Milanesi, Carlo 2020 Packt Publishing
Rust Programming Cookbook: Explore the latest features of Rust 2018 for building fast and secure apps Matzinger, Claus 2019 Packt Publishing
The Rust Programming Language (Covers Rust 2018) Klabnik, Steve and Nichols, Carol 2019-08-12T00:00:01Z No Starch Press
Rust for Rustaceans: Idiomatic Programming for Experienced Developers Gjengset, Jon 2021 No Starch Press
Hands-on Rust Wolverson, Herbert 2021 Pragmatic Bookshelf
Rust for Rustaceans: Idiomatic Programming for Experienced Developers Gjengset, Jon 2021 No Starch Press
The Rust Programming Language (Covers Rust 2018) Klabnik, Steve and Nichols, Carol 2019 No Starch Press
Command-Line Rust: A Project-Based Primer for Writing Rust CLIs Youens-Clark, Ken 2022 O'Reilly Media
Beginning Rust Programming Messier, Ric 2021 Wiley
Creative Projects for Rust Programmers: Build exciting projects on domains such as web apps, WebAssembly, games, and parsing Milanesi, Carlo 2020 Packt Publishing
Rust in Action McNamara, Tim 2021 Manning
Rust Web Programming: A hands-on guide to developing fast and secure web apps with the Rust programming language Flitton, Maxwell 2021 Packt Publishing - ebooks Account
Hands-On Data Structures and Algorithms with Rust: Learn programming techniques to build effective, maintainable, and readable code in Rust 2018 Matzinger, Claus 2019-01-25T00:00:01Z Packt Publishing
The Rust Programming Language Klabnik, Steve and Nichols, Carol 2018 No Starch Press
The Complete Rust Programming Reference Guide: Design, develop, and deploy effective software systems using the advanced constructs of Rust Sharma, Rahul and Kaihlavirta, Vesa and Matzinger, Claus 2019-05-22T00:00:01Z Packt Publishing
Rust for the IoT: Building Internet of Things Apps with Rust and Raspberry Pi Nusairat, Joseph Faisal 2020 Apress
Rust for the IoT: Building Internet of Things Apps with Rust and Raspberry Pi Nusairat, Joseph Faisal 2020 Apress
Hands-On Microservices with Rust: Build, test, and deploy scalable and reactive microservices with Rust 2018 Kolodin, Denis 2019 Packt Publishing
Practical Machine Learning with Rust: Creating Intelligent Applications in Rust Bhattacharjee, Joydeep 2019 Apress
Rust Programming Cookbook: Explore the latest features of Rust 2018 for building fast and secure apps Matzinger, Claus 2019 Packt Publishing
Beginning Rust Programming Messier, Ric 2021 Wiley
Hands-On Functional Programming in Rust: Build modular and reactive applications with functional programming techniques in Rust 2018 Johnson, Andrew 2018 Packt Publishing
Rust High Performance: Learn to skyrocket the performance of your Rust applications Eguia Moraza, Iban 2018 Packt Publishing
Rust Programming By Example: Enter the world of Rust by building engaging, concurrent, reactive, and robust applications Gomez, Guillaume and Boucher, Antoni 2018 Packt Publishing
Practical Rust Web Projects: Building Cloud and Web-Based Applications Lyu, Shing 2021 Apress
Hands-On Functional Programming in Rust: Build modular and reactive applications with functional programming techniques in Rust 2018 Johnson, Andrew 2018-05-31T00:00:01Z Packt Publishing
Practical System Programming for Rust Developers: Build fast and secure software for Linux/Unix systems with the help of practical examples Eshwarla, Prabhu 2020-12-24T00:00:01Z Packt Publishing
Practical Rust Projects: Building Game, Physical Computing, and Machine Learning Applications Lyu, Shing 2020 Apress
Step Ahead with Rust: Systems Programming in Rust Jonathan Creekmore and James Miller 2018-01-15T00:00:00.000Z Armstrong Publications LLC
Mastering Rust: Learn about memory safety, type system, concurrency, and the new features of Rust 2018 edition, 2nd Edition Sharma, Rahul and Kaihlavirta, Vesa 2019 Packt Publishing
Rust Quick Start Guide: The easiest way to learn Rust programming Arbuckle, Daniel 2018 Packt Publishing
Rust Programming By Example: Enter the world of Rust by building engaging, concurrent, reactive, and robust applications Gomez, Guillaume and Boucher, Antoni 2018-01-11T00:00:01Z Packt Publishing
Practical Rust Projects: Building Game, Physical Computing, and Machine Learning Applications Lyu, Shing 2020 Apress
The Rust Programming Language Steve Klabnik and Carol Nichols 2019
Rust programming(Chinese Edition) ZHANG HAN DONG ZHU 2019 Electronic Industry Press
Practical WebAssembly-Explore the fundamentals of WebAssembly programming using Rust Sendil Kumar Nellaiyapen 2022 Packt Publishing - ebooks Account
Learn Rust Programming: Safe Code, Supports Low Level and Embedded Systems Programming with a Strong Ecosystem (English Edition) Matzinger, Claus 2022 BPB Publications
Rust Crash Course: Build High-Performance, Efficient and Productive Software with the Power of Next-Generation Programming Skills (English Edition) Kumar, Abhishek 2022 BPB Publications
Learning Rust Paul Johnson 24-11-2017 Packt Publishing
Programming Rust Jim Blandy and Jason Orendorff and Leonora F.S. Tindall 2021 O'reilly Media, Inc.
Mastering Rust Vesa Kaihlavirta 2017-05-30 Packt Publishing
Programming Rust Jim Blandy; Jason Orendorff; Leonora F .S. Tindall 20210611 O'Reilly Media, Inc.
Programming Rust Jim Blandy; Jason Orendorff 20171121 O'Reilly Media, Inc.
Rust Essentials Ivo Balbaert 2015-05-27 Packt Publishing
Rust Cookbook Vigneshwer Dhinakaran 2017-07-27 Packt Publishing
Beginning Rust Carlo Milanesi 20180322 Springer Nature
Rust In Action Tim McNamara 2021 翔泳社
Rust Web Programming Maxwell Flitton 26-02-2021 Packt Publishing
Command-line Rust Ken Youens-Clark 2022 O'reilly Media, Inc.
Rust Brain Teasers Herbert Wolverson 20220225 O'Reilly Media, Inc.
Command-Line Rust Ken Youens-Clark 20220113 O'Reilly Media, Inc.
Network Programming With Rust Abhishek Chanda
Rust Quick Start Guide Daniel Arbuckle 30-10-2018 Packt Publishing
Rust Essentials - Second Edition Ivo Balbaert 43047 Packt Publishing
Rust Standard Library Cookbook Jan Hohenheim, Daniel Durante 29-03-2018 Packt Publishing
Learn Rust In 7 Days Matthew Stoodley
Rust Web Development with Rocket Karuna Murti 2022-06-30 Packt Publishing
Hands-On Concurrency with Rust Brian L. Troutwine 31-05-2018 Packt Publishing
Practical System Programming for Rust Developers Prabhu Eshwarla 24-12-2020 Packt Publishing
Game Development with Rust and WebAssembly Eric Smith 29-04-2022 Packt Publishing
The Complete Rust Programming Reference Guide Rahul Sharma; Vesa Kaihlavirta; Claus Matzinger 43607 Packt Publishing
Speed Up Your Python with Rust Maxwell Flitton 21-01-2022 Packt Publishing
Hands-On Data Structures and Algorithms with Rust Claus Matzinger 25-01-2019 Packt Publishing

Publications about Rust from Semantic Scholar

title authors year citations influentialCitations
The rust language Nicholas D. Matsakis and Felix S. Klock 2014 238 25
RustBelt: securing the foundations of the rust programming language Ralf Jung and Jacques-Henri Jourdan and R. Krebbers and Derek Dreyer 2017 192 23
Is Rust Used Safely by Software Developers? A. Evans and Bradford Campbell and M. Soffa 2020 23 5
Understanding memory and thread safety practices and issues in real-world Rust programs Boqin Qin and Yilun Chen and Zeming Yu and Linhai Song and Yiying Zhang 2020 23 5
POSTER: Rust SGX SDK: Towards Memory Safety in Intel SGX Enclave Yu Ding and Ran Duan and Long Li and Yueqiang Cheng and Yulong Zhang and Tanghui Chen and Tao Wei and Huibo Wang 2017 21 4
Sandcrust: Automatic Sandboxing of Unsafe Components in Rust Benjamin Lamowski and C. Weinhold and A. Lackorzynski and Hermann Härtig 2017 20 3
Verifying Rust Programs with SMACK Marek S. Baranowski and Shaobo He and Z. Rakamaric 2018 20 1
Safe systems programming in Rust Ralf Jung and Jacques-Henri Jourdan and R. Krebbers and Derek Dreyer 2021 17 0
KRust: A Formal Executable Semantics of Rust Feng Wang and Fu Song and Min Zhang and Xiaoran Zhu and Jun Zhang 2018 12 1
Exploring Rust for Unikernel Development Stefan Lankes and J. Breitbart and Simon Pickartz 2019 12 0
Understanding and evolving the Rust programming language Ralf Jung 2020 11 1
Fidelius Charm: Isolating Unsafe Rust Code Hussain M. J. Almohri and David Evans 2018 8 2
Design of a DSL for Converting Rust Programming Language into RTL K. Takano and Tetsuya Oda and M. Kohata 2020 8 0
Identifying Barriers to Adoption for Rust through Online Discourse Anna Zeng and Will Crichton 2019 7 0
Memory-Safety Challenge Considered Solved? An In-Depth Study with All Rust CVEs Hui Xu and Zhuangbin Chen and Mingshen Sun and Yangfan Zhou and Michael R. Lyu 2020 6 1
Securing UnSafe Rust Programs with XRust Peiming Liu and Gang Zhao and Jeff Huang 2020 6 2
GhostCell: separating permissions from data in Rust Joshua Yanovski and Hoang-Hai Dang and Ralf Jung and Derek Dreyer 2021 5 1
A Lightweight Formalism for Reference Lifetimes and Borrowing in Rust David J. Pearce 2021 5 0
What can the programming language Rust do for astrophysics? S. Blanco-Cuaresma and É. Bolmont 2016 5 0
On utilizing rust programming language for Internet of Things Tunç Uzlu and E. Saykol 2017 4 0
Structured Stream Parallelism for Rust Ricardo Pieper and Dalvan Griebler and L. G. Fernandes 2019 3 0
Keeping Safe Rust Safe with Galeed Elijah Rivera and Samuel Mergendahl and Howie Shrobe and H. Okhravi and N. Burow 2021 3 0
RustHornBelt: a semantic foundation for functional verification of Rust programs with unsafe code Yusuke Matsushita and Xavier Denis and Jacques-Henri Jourdan and Derek Dreyer 2022 2 0
Towards Profile-Guided Optimization for Safe and Efficient Parallel Stream Processing in Rust Stefan Sydow and Mohannad Nabelsee and S. Glesner and Paula Herber 2020 2 0
Rudra: Finding Memory Safety Bugs in Rust at the Ecosystem Scale Yechan Bae and Youngsuk Kim and Ammar Askar and Jungwon Lim and Taesoo Kim 2021 2 1
Detecting Unsafe Raw Pointer Dereferencing Behavior in Rust Zhijian Huang and Y. Wang and J. Liu 2018 1 0
Basics of Rust J. Bhattacharjee 2019 1 0
Devise Rust Compiler Optimizations on RISC-V Architectures with SIMD Instructions Heng Lin and Piyo Chen and Yuan-Shin Hwang and Jenq-Kuen Lee 2019 1 0
Verification of Safety Functions Implemented in Rust - a Symbolic Execution based approach Marcus Lindner and Nils Fitinghoff and Johan Eriksson and P. Lindgren 2019 1 0
Verifying Dynamic Trait Objects in Rust Alexa VanHattum and Daniel Schwartz-Narbonne and Nathan Chong and Adrian Sampson 2022 1 0
SafeDrop: Detecting Memory Deallocation Bugs of Rust Programs via Static Data-Flow Analysis Mohan Cui and Chengjun Chen and Hui Xu and Yangfan Zhou 2021 1 0
VRLifeTime -- An IDE Tool to Avoid Concurrency and Memory Bugs in Rust Ziyi Zhang and Boqin Qin and Yilun Chen and Linhai Song and Yiying Zhang 2020 1 0
Approach of a Coding Conventions for Warning and Suggestion in Transpiler for Rust Convert to RTL K. Takano and Tetsuya Oda and M. Kohata 2020 1 0
Translating C to safer Rust Mehmet Emre and Ryan Schroeder and Kyle Dewey and B. Hardekopf 2021 1 0
Performance vs Programming Effort between Rust and C on Multicore Architectures: Case Study in N-Body Manuel Costanzo and Enzo Rucci and M. Naiouf and A. D. Giusti 2021 1 0
On Evaluating Rust as a Programming Language for the Future of Massive Agent-Based Simulations Alessia Antelmi and G. Cordasco and Matteo D'Auria and Daniele De Vinco and A. Negro and Carmine Spagnuolo 2019 1 0
css.html · rust.html · haskell.html

View source

PLDB - Build the next great programming language · v2022 · Day 33 · Docs · Build · Acknowledgements · Traffic Today · Traffic Trends · Mirrors · GitHub · feedback@pldb.com