mirror of
https://github.com/sunface/rust-by-practice.git
synced 2025-06-23 04:29:41 +00:00
update readme.md
This commit is contained in:
17
Readme.md
17
Readme.md
@ -1,8 +1,21 @@
|
||||
# Rust By Practice
|
||||
<div align="center">
|
||||
<img height="150" src="https://github.com/sunface/rust-by-practice/blob/master/assets/logo.png">
|
||||
<div>
|
||||
<span>English</span>
|
||||
<span> | </span>
|
||||
<a href="https://github.com/sunface/rust-by-practice/blob/master/zh-CN/src/why-exercise.md">中文</a>
|
||||
</div>
|
||||
<p align="center">Practice Rust with challenging examples, exercises and projects</p>
|
||||
</div>
|
||||
|
||||
<div align="center">
|
||||
|
||||
[](https://github.com/sunface/rust-by-practice/stargazers) [](https://github.com/naaive/orange/network/members)
|
||||
[](https://github.com/sunface/rust-by-practice/blob/master/LICENSE)
|
||||
</div>
|
||||
|
||||
This book was designed for easily diving into and get skilled with Rust, and it's very easy to use: All you need to do is to make each exercise compile without ERRORS and Panics !
|
||||
|
||||
> 🎊 Updated on 2022-03-14: Add Chapter [Crate and Module](https://practice.rs/crate-module/intro.html)
|
||||
|
||||
## Reading online
|
||||
|
||||
|
BIN
assets/logo.png
Normal file
BIN
assets/logo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 94 KiB |
@ -19,7 +19,7 @@ version = "0.1.0"
|
||||
edition = "2021"
|
||||
```
|
||||
|
||||
> Note! We will this package across the whole chapter
|
||||
> Note! We will use this package across the whole chapter as a practice project.
|
||||
|
||||
2. 🌟 Create a package with below layout:
|
||||
```shell
|
||||
@ -90,11 +90,11 @@ After this step, there should be two crates in package `hello-package`: **a bina
|
||||
├── Cargo.toml
|
||||
├── Cargo.lock
|
||||
├── src
|
||||
│ ├──
|
||||
│ ├──
|
||||
│ └──
|
||||
│ └──
|
||||
│ └──
|
||||
│ ├── __
|
||||
│ ├── __
|
||||
│ └── __
|
||||
│ └── __
|
||||
│ └── __
|
||||
├── tests # directory for integrated tests files
|
||||
│ └── some_integration_tests.rs
|
||||
├── benches # dir for benchmark files
|
||||
@ -103,4 +103,7 @@ After this step, there should be two crates in package `hello-package`: **a bina
|
||||
└── simple_example.rs
|
||||
```
|
||||
|
||||
Yep, as you can see, the above package structure is very standard and is widely used in many Rust projects.
|
||||
Yep, as you can see, the above package structure is very standard and is widely used in many Rust projects.
|
||||
|
||||
|
||||
> You can find the solutions [here](https://github.com/sunface/rust-by-practice) (under the solutions path), but only use it when you need it :)
|
@ -190,4 +190,6 @@ fn main() {
|
||||
assert_eq!(__, "sit down please");
|
||||
assert_eq!(__,"yummy yummy!");
|
||||
}
|
||||
```
|
||||
```
|
||||
|
||||
> You can find the solutions [here](https://github.com/sunface/rust-by-practice) (under the solutions path), but only use it when you need it :)
|
@ -63,4 +63,7 @@ pub mod a {
|
||||
```
|
||||
|
||||
### Full Code
|
||||
The full code of `hello-package` is [here](https://github.com/sunface/rust-by-practice/tree/master/practices/hello-package).
|
||||
The full code of `hello-package` is [here](https://github.com/sunface/rust-by-practice/tree/master/practices/hello-package).
|
||||
|
||||
|
||||
> You can find the solutions [here](https://github.com/sunface/rust-by-practice) (under the solutions path), but only use it when you need it :)
|
Reference in New Issue
Block a user