├── .gitignore ├── LICENSE ├── README.md ├── book.toml ├── public-images └── rust-from-c-haskell.png └── src ├── Part-I-Concept ├── Foreword.md └── overview.md ├── Part-II-Practical ├── Foreword.md └── overview.md ├── Part-III-Safety-Security ├── Foreword.md └── overview.md ├── Part-IV-Appendices ├── overview.md └── rust-coding-guide.md ├── Preface.md ├── SUMMARY.md └── images └── tiobe-2022-11.png /.gitignore: -------------------------------------------------------------------------------- 1 | book 2 | .DS_Store -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 Alex 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # The Rust Way of Programming 2 | 3 | Write a Rust programming book in English, dedicated to Rust-loving friends around the world. 4 | 5 | Nowadays, many Rust programming learning materials are written for people who have a certain foundation in programming. This book is an attempt and a challenge to be oriented towards zero programming foundation without losing its depth of content, and to inspire developers with certain Rust programming experience. 6 | 7 | Since C can be geared towards beginner programmers, so can Rust. 8 | 9 | > Welcome friends to correct errors, including content cognition and English grammar word description errors and so on. 10 | 11 | ## Content Structure (Draft) 12 | 13 | - Part I: Concept 14 | - Part II: Practical 15 | - Part III: Safety && Security 16 | - Part IV: Appendices 17 | 18 | 19 | -------------------------------------------------------------------------------- /book.toml: -------------------------------------------------------------------------------- 1 | [book] 2 | authors = ["blackanger"] 3 | language = "en" 4 | multilingual = false 5 | src = "src" 6 | title = "The Rust Way of Programming" 7 | -------------------------------------------------------------------------------- /public-images/rust-from-c-haskell.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhangHanDong/The-Rust-Way-of-Programming/HEAD/public-images/rust-from-c-haskell.png -------------------------------------------------------------------------------- /src/Part-I-Concept/Foreword.md: -------------------------------------------------------------------------------- 1 | # Foreword 2 | -------------------------------------------------------------------------------- /src/Part-I-Concept/overview.md: -------------------------------------------------------------------------------- 1 | # Part I: Concept 2 | -------------------------------------------------------------------------------- /src/Part-II-Practical/Foreword.md: -------------------------------------------------------------------------------- 1 | # Foreword 2 | -------------------------------------------------------------------------------- /src/Part-II-Practical/overview.md: -------------------------------------------------------------------------------- 1 | # Part II: Practical 2 | -------------------------------------------------------------------------------- /src/Part-III-Safety-Security/Foreword.md: -------------------------------------------------------------------------------- 1 | # Foreword 2 | -------------------------------------------------------------------------------- /src/Part-III-Safety-Security/overview.md: -------------------------------------------------------------------------------- 1 | # Part III: Safety && Security 2 | -------------------------------------------------------------------------------- /src/Part-IV-Appendices/overview.md: -------------------------------------------------------------------------------- 1 | # Part IV: Appendices 2 | -------------------------------------------------------------------------------- /src/Part-IV-Appendices/rust-coding-guide.md: -------------------------------------------------------------------------------- 1 | # Rust-Coding-Guidelines 2 | 3 | [Rust Coding Specification](https://rust-coding-guidelines.github.io/rust-coding-guidelines/) -------------------------------------------------------------------------------- /src/Preface.md: -------------------------------------------------------------------------------- 1 | # 《The Rust Way of Programming》 Preface 2 | 3 | This book is dedicated to Rust lovers around the world. 4 | 5 | ## Target Readers 6 | 7 | Nowadays, many Rust programming learning materials are written for people with some programming basics. This book is an attempt and a challenge to be geared towards zero programming basics without losing the depth of the content, and to inspire developers with some Rust programming experience. 8 | 9 | Since C can be geared towards beginners with zero programming fundamentals, so can Rust. But it's a challenge, because learning Rust requires a lot of basic computer and programming-related knowledge. 10 | 11 | Fortunately, Time in progress. 12 | 13 | The November 2022 TIOBE list finds the `Scratch` language at `#17`, higher than Rust, which is at `#20`. `Scratch` is a language for kids, and this ranking indicates a worldwide trend of children and teens learning to program. `Python`, the top-ranked language, has also sunk to the list for teens learning programming. 14 | 15 | ![tiobe](./images/tiobe-2022-11.png) 16 | 17 | Traditionally, people who can't program are broadly classified as those who have zero programming skills. But we are now in an era where programming has become popular among teenagers, and it is time to redefine the zero-based programming population. 18 | 19 | Redefine the broad zero-basic programming population as. 20 | 1. people who are interested in computers and programming and already have an initial understanding of computers and programming. This level of understanding, at least, is to know what programming is? What can programming do? What can computers do? 21 | 2. we exclude the "one-finger" people who can't even type on a computer keyboard, not because of discrimination, but because the target group of this book will never be these people, because they may not even be interested in computers. 22 | 23 | Defining the target readers facilitates the organization of the book. 24 | 25 | Since the book is mainly about the Rust language, we need to further define the zero programming base for this book according to the characteristics of the Rust language: 26 | 1. People who have some basic knowledge of the `C` language. The foundation of learning `Rust` is `C`. Because the `C` language has long replaced assembly language solidified as the interface between hardware and software. As to what level of `C` language is considered basic, we will provide the `C` language foundation in the appendix . 27 | 2. People who have some knowledge of operating systems. After all, Rust is a system-level programming language, and knowledge of the operating system is the foundation for mastering Rust. In fact, in addition to operating system knowledge, it also includes computer composition principles, etc. These are the basics that Rust language learners need to have. But we can't ask too much for zero programming knowledge, at least experience with Linux, or an understanding of the difference between the Linux kernel and user state. 28 | 29 | Although this book is aimed at people with zero programming knowledge, you can't have no basic knowledge either. 30 | 31 | Therefore, the appropriate audience for this book is 32 | - Those who meet the above definition of programming 33 | - People who want to learn Rust systematically and want to master the language in depth 34 | 35 | 36 | ## Content Organization 37 | 38 | TODO 39 | -------------------------------------------------------------------------------- /src/SUMMARY.md: -------------------------------------------------------------------------------- 1 | # Summary 2 | 3 | - [Preface](./Preface.md) 4 | - [Part I: Concept](./Part-I-Concept/overview.md) 5 | - [Foreword](./Part-I-Concept/Foreword.md) 6 | - [Part II: Practical](./Part-II-Practical/overview.md) 7 | - [Foreword](./Part-II-Practical/Foreword.md) 8 | - [Part III: Safety && Security](./Part-III-Safety-Security/overview.md) 9 | - [Foreword](./Part-III-Safety-Security/Foreword.md) 10 | - [Part IV: Appendices](./Part-IV-Appendices/overview.md) 11 | - [Rust-Coding-Guidelines](./Part-IV-Appendices/rust-coding-guide.md) 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /src/images/tiobe-2022-11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhangHanDong/The-Rust-Way-of-Programming/HEAD/src/images/tiobe-2022-11.png --------------------------------------------------------------------------------