From 447c6a31080b50973e5b58ce89d83d7286065173 Mon Sep 17 00:00:00 2001 From: sunface Date: Thu, 17 Mar 2022 10:15:10 +0800 Subject: [PATCH] update [Small projects with Elegant code] --- src/elegant-code-base.md | 22 ++++++++++++++++------ zh-CN/src/SUMMARY.md | 1 + zh-CN/src/elegant-code-base.md | 28 ++++++++++++++++++++++++++++ 3 files changed, 45 insertions(+), 6 deletions(-) create mode 100644 zh-CN/src/elegant-code-base.md diff --git a/src/elegant-code-base.md b/src/elegant-code-base.md index 1d3dce9..539aa29 100644 --- a/src/elegant-code-base.md +++ b/src/elegant-code-base.md @@ -1,20 +1,30 @@ # Small projects with Elegant code base -We have been seeing such questions in Rust forums for a long time: +Following questions come up weekly in online Rust discussions: +- I just finished reading The Book, what should I do next ? - What projects would you recommend to a Rust beginner? - Looking for small projects with an elegant code base - Codes that is easy to read and learn -So, collecting relative resourses and representing in _Rust By Practice_ seems not a bad idea. +The answers to these questions are always **Practice**: doing some exercises, and then reading some small and excellent Rust projects. -1. 🌟🌟🌟🌟 +This is precisely the goal of this book, so, collecting relative resourses and representing in _Rust By Practice_ seems not a bad idea. + +1. Ripgrep Answers for above questions usually came with [`ripgrep`](https://github.com/BurntSushi/ripgrep), though I don't think it is a **small** project, but yes, go for it if you are not afraid to delve deep a bit. -2. 🌟🌟🌟 +2. Building a text editor Tutorial [`https://www.philippflenker.com/hecto/`](https://www.philippflenker.com/hecto/) will lead you to build a text editor from scratch. -3. 🌟🌟🌟 -[Ncspot](https://github.com/hrkfdn/ncspot), a terminal spotify client. Small, simple, well organized and async, it's good for learning. +5. Ncspot +[Ncspot](https://github.com/hrkfdn/ncspot), a terminal Spotify client. Small, simple, well organized and async, it's good for learning. + +4. Command Line Rust +[This project](https://github.com/kyclark/command-line-rust) is for the book `Command-Line Rust(O'Reily)` ,it will show you how to write small CLIS( clones of head, cat, ls). + +5. pngme book +[This book](https://picklenerd.github.io/pngme_book/) will guide you to make a command line program that lets you hide secret messages in PNG files. The primary goal here is to get you writing code. The secondary goal is to get you reading documentation. + **To be continued...** \ No newline at end of file diff --git a/zh-CN/src/SUMMARY.md b/zh-CN/src/SUMMARY.md index 74dd804..d9dc88e 100644 --- a/zh-CN/src/SUMMARY.md +++ b/zh-CN/src/SUMMARY.md @@ -1,6 +1,7 @@ # Summary - [关于 pracitce.rs](why-exercise.md) +- [值得学习的小型项目](elegant-code-base.md) - [变量绑定与解构](variables.md) - [基本类型](basic-types/intro.md) - [数值类型](basic-types/numbers.md) diff --git a/zh-CN/src/elegant-code-base.md b/zh-CN/src/elegant-code-base.md new file mode 100644 index 0000000..cb757da --- /dev/null +++ b/zh-CN/src/elegant-code-base.md @@ -0,0 +1,28 @@ +# 值得学习的小型项目 +在国内外的各大 Rust 论坛上,以下问题非常常见: + +- 作为 Rust 新手,有哪些项目值得推荐学习? +- 求推荐代码优雅的小型项目 +- 有哪些值得推荐的简单、易读的项目 + +这些问题的答案往往只有一个,那就是实践:做一些优秀的练习题,然后阅读一些小而美的 Rust 项目。 + +这个恰恰跟本书的目标吻合,因此,我们决定收集一些优秀的资源,并在 _Rust语言实战_ 中呈现给大家。 + +1. Ripgrep +以上的问题通常都会伴随着 [`ripgrep`](https://github.com/BurntSushi/ripgrep) 的推荐, 虽然我不认为它是一个小型项目,但是依然非常推荐大家学习,当然,首先你得做好深挖的准备和耐心。 + +2. 教程:构建一个文本编辑器 +该教程 [`https://www.philippflenker.com/hecto/`](https://www.philippflenker.com/hecto/) 将带领我们从零开始构建一个文本编辑器. + +3. Ncspot +[Ncspot](https://github.com/hrkfdn/ncspot) 是一个终端访问的 Spotify 客户端,小巧、简单、良好的代码组织以及异步编程,值得学习. + +4. 命令行 Rust +[这个项目](https://github.com/kyclark/command-line-rust) 是书本 `Command-Line Rust(O'Reily)` 的配套项目,可以帮助大家理解该如何更好的编写命令行程序,例如 `head`, `cat`, `ls`。 + +5. 在 PNG 中隐藏你的秘密 +[这本书](https://picklenerd.github.io/pngme_book/) 将带领大家编写一个命令行程序,功能是在 PNG 文件中隐藏一些秘密信息,首要目标是让我们熟悉 Rust 代码。 + + +**To be continued...** \ No newline at end of file