English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

Rust Tutorial

Rust is a modern system programming language developed by Mozilla Corporation. It aims to become the language for highly concurrent and highly secure systems. It is compiled into native code; therefore, it is like C and C ++as fast. This tutorial uses a simple and practical method to describe the concepts of Rust programming.

Rust is a high-efficiency and reliable general-purpose high-level programming language. Its efficiency is not limited to development efficiency, but also its execution efficiency is commendable, making it a rare language that combines development efficiency and execution efficiency.

The Rust language is developed by Mozilla and was first released in 2014 Year 9 Month. Rust's compiler is under the MIT License and Apache License 2.0 dual protocol declaration under free open source software. As of now( 2020 years 1 Month) The latest compiler version is 1.41.0.

Rust official online tools: https://play.rust-lang.org/.

The content of the Rust series articles is produced by Sobin Collection and organization.

Characteristics of the Rust language

  • High Performance -  Rust is incredibly fast and has high memory utilization. Due to the lack of runtime and garbage collection, it can handle services with particularly high performance requirements, can run on embedded devices, and can easily integrate with other languages.

  • Reliability - Rust's rich type system and ownership model ensure memory safety and thread safety, allowing you to eliminate various errors at compile time.

  • Productivity - Rust has excellent documentation, a friendly compiler, and clear error提示 information, and also integrates first-class tools such as package managers and build tools, intelligent auto-completion and type checking multi-editor support, as well as automatic code formatting, etc.

Rust Applications

Rust language can be used to develop:

  • Traditional Command Line Programs - The Rust compiler can directly generate the target executable program without the need for any interpreter.

  • Web Applications -  Rust can be compiled into WebAssembly, which is an efficient substitute for JavaScript.

  • Network Servers - Rust can achieve safe and efficient performance with extremely low resource consumption and has strong large-scale concurrent processing capabilities, making it very suitable for developing ordinary or extreme server programs.

  • Embedded Devices - Rust has the efficient development syntax of JavaScript and the execution efficiency of C language, supporting the development of low-level platforms.

Who is Suitable for Reading This Tutorial?

This tutorial assumes that the reader has a basic understanding of programming, so if you are reading this tutorial, you should have some understanding of basic programming knowledge (it is best to have a basic understanding of C/C++ or JavaScript programming language).

The First Rust Program

The file extension for Rust language code files is .rs, such as w3codebox.rs.

fn main() {
    println!("Hello World!");
}
Test and See ‹/›

Reference Links