中文
R
NiQin shared an aphorism: 这是极为特殊的历史转折期,物质文明发展到这一步注定了精神(信仰)的缺失,灵魂空虚、物欲横流,人们的精神堕入虚无主义,只能沉浸在金钱物质欲望和肉体感官刺激中,有各种不安和痛苦。多少年轻人也失去了纯真的理想和纯美的爱情。这绝不仅是我们这个星球上的生命的悲剧,而是任何一种生命在文明发展进程中注定的悲哀。生命的意义到底是什么?我们到底该怎样活着? -- 《重大人生启示录 - 前言》

Programming Languages Rust by Example No.627bccff7e84024c6ea0739a Sticky Recommended Alternative URL

NiQin updated at 2022-05-11 22:49:35+08:00

💥 Overview of book & doc

Hits: 104157

Keys/tags: rust rust-examples rust-by-example

Rust is a modern systems programming language focusing on safety, speed, and concurrency. It accomplishes these goals by being memory safe without using garbage collection.

Rust by Example (RBE) is a collection of runnable examples that illustrate various Rust concepts and standard libraries. To get even more out of these examples, don’t forget to install Rust locally and check out the official docs. Additionally for the curious, you can also check out the source code for this site.

Now let’s begin!

  • Hello World - Start with a traditional Hello World program.

  • Primitives - Learn about signed integers, unsigned integers and other primitives.

  • Custom Types - struct and enum.

  • Variable Bindings - mutable bindings, scope, shadowing.

  • Types - Learn about changing and defining types.

  • Conversion

  • Expressions

  • Flow of Control - if/else, for, and others.

  • Functions - Learn about Methods, Closures and High Order Functions.

  • Modules - Organize code using modules

  • Crates - A crate is a compilation unit in Rust. Learn to create a library.

  • Cargo - Go through some basic features of the official Rust package management tool.

  • Attributes - An attribute is metadata applied to some module, crate or item.

  • Generics - Learn about writing a function or data type which can work for multiple types of arguments.

  • Scoping rules - Scopes play an important part in ownership, borrowing, and lifetimes.

  • Traits - A trait is a collection of methods defined for an unknown type: Self

  • Macros

  • Error handling - Learn Rust way of handling failures.

  • Std library types - Learn about some custom types provided by std library.

  • Std misc - More custom types for file handling, threads.

  • Testing - All sorts of testing in Rust.

  • Unsafe Operations

  • Compatibility

  • Meta - Documentation, Benchmarking.

All rights of books and documents belong to the authors, editors, and translators, the goal of this site is to facilitate reading. If there is anything improper, please contact ask@rusthub.org.

Read Now Alternative URL