add chinese zh repo

This commit is contained in:
sunface
2022-02-23 15:14:41 +08:00
parent 8456088a7b
commit f15bccde29
175 changed files with 383 additions and 4 deletions

BIN
.DS_Store vendored Normal file

Binary file not shown.

View File

View File

@ -1,10 +1,8 @@
[book] [book]
title = "Rust Exercise" title = "Rust Exercise"
description = "A set of exercises and examples to pratice various aspects of Rust, also for the rust course (book) at https://course.rs" description = "A set of exercises and examples to pratice various aspects of Rust, also for the rust course (book) at https://course.rs"
authors = ["course.rs"] authors = ["sunface, https://im.dev"]
language = "en" language = "en"
multilingual = false
src = "src"
[output.html.playpen] [output.html.playpen]
editable = true editable = true
@ -14,7 +12,9 @@ editor = "ace"
enable = true enable = true
[output.html] [output.html]
git-repository-url = "https://github.com/course-rs/rust-exercise" additional-js = ["assets/lang.js"]
git-repository-url = "https://github.com/sunface/rust-exercise"
edit-url-template = "https://github.com/sunface/rust-exercise/edit/master/{path}"
[rust] [rust]
edition = "2021" edition = "2021"

View File

1
zh/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
book

1
zh/assets/CNAME Normal file
View File

@ -0,0 +1 @@
zh.exercise.rs

20
zh/book.toml Normal file
View File

@ -0,0 +1,20 @@
[book]
title = "Rust Exercise"
description = "A set of exercises and examples to pratice various aspects of Rust, also for the rust course (book) at https://course.rs"
authors = ["sunface, https://im.dev"]
language = "en"
[output.html.playpen]
editable = true
editor = "ace"
[output.html.fold]
enable = true
[output.html]
additional-js = ["assets/lang.js"]
git-repository-url = "https://github.com/sunface/rust-exercise"
edit-url-template = "https://github.com/sunface/rust-exercise/edit/master/{path}"
[rust]
edition = "2021"

21
zh/deploy Executable file
View File

@ -0,0 +1,21 @@
## this script deploys the static website of course.rs to github pages
## build static website for book
mdbook build
## copy CNAME info to book dir
cp ./assets/CNAME ./book/
cp ./assets/*.html ./book/
cp ./assets/sitemap.xml ./book/
## init git repo
cd book
git init
git config user.name "sunface"
git config user.email "cto@188.com"
git add .
git commit -m 'deploy'
git branch -M gh-pages
git remote add origin https://github.com/course-rs/rust-exercise
## push to github pages
git push -u -f origin gh-pages

79
zh/src/SUMMARY.md Normal file
View File

@ -0,0 +1,79 @@
# Summary
- [Why Exercise.rs](why-exercise.md)
- [Variables](variables.md)
- [Basic Types](basic-types/intro.md)
- [Numbers](basic-types/numbers.md)
- [Char, Bool and Unit](basic-types/char-bool-unit.md)
- [Statements and Expressions](basic-types/statements-expressions.md)
- [Functions](basic-types/functions.md)
- [Ownership and Borrowing](ownership/intro.md)
- [Ownership](ownership/ownership.md)
- [Reference and Borrowing](ownership/borrowing.md)
- [Compound Types](compound-types/intro.md)
- [string and slice](compound-types/string-slice.md)
- [tuple](compound-types/tuple.md)
- [struct](compound-types/struct.md)
- [enum](compound-types/enum.md)
- [array](compound-types/array.md)
- [Flow Control](flow-control.md)
- [Pattern Match](pattern-match/intro.md)
- [match, if let](pattern-match/match-iflet.md)
- [Option destructing](pattern-match/option.md)
- [Patterns](pattern-match/patterns.md)
- [Method](method.md)
- [Generics and Traits](generics-traits/intro.md)
- [Generics](generics-traits/generics.md)
- [Traits](generics-traits/traits.md)
- [Trait Object](generics-traits/trait-object.md)
- [Advance Traits](generics-traits/advance-traits.md)
- [Collection Types](collections/intro.md)
- [Vector](collections/vector.md)
- [HashMap](collections/hashmap.md)
- [Type Conversion](type-conversion.md)
- [Result and panic](result-panic/intro.md)
- [panic!](result-panic/panic.md)
- [result and ?](result-panic/result.md)
- [Crate and module](crate-module/intro.md)
- [Crate](crate-module/crate.md)
- [Module](crate-module/module.md)
- [use and pub](crate-module/use-pub.md)
- [Comments and Docs](comments-docs.md)
- [Formatted output](formatted-output.md)
- [Lifetime](lifetime/intro.md)
- [basic](lifetime/basic.md)
- [&'static and T: 'static](lifetime/static.md)
- [advance](lifetime/advance.md)
- [Functional programing](functional-programing/intro.md)
- [Closure](functional-programing/cloure.md)
- [Iterator](functional-programing/iterator.md)
- [newtype and Sized](newtype-sized.md)
- [Smart pointers](smart-pointers/intro.md)
- [Box](smart-pointers/box.md)
- [Deref](smart-pointers/deref.md)
- [Drop](smart-pointers/drop.md)
- [Rc and Arc](smart-pointers/rc-arc.md)
- [Cell and RefCell](smart-pointers/cell-refcell.md)
- [Weak and Circle reference](weak.md)
- [Self referential](self-referential.md)
- [Threads](threads/intro.md)
- [Basic using](threads/basic-using.md)
- [Message passing](threads/message-passing.md)
- [Sync](threads/sync.md)
- [Atomic](threads/atomic.md)
- [Send and Sync](threads/send-sync.md)
- [Global variables](global-variables.md)
- [Errors](errors.md)
- [unsafe](unsafe.md)
- [macro](macro.md)
- [Tests](tests/intro.md)
- [Write Tests](tests/write-tests.md)
- [Benchmark](tests/benchmark.md)
- [Unit and Integration](tests/unit-integration.md)
- [Assertions](tests/assertions.md)
- [Async/Await](async/intro.md)
- [async and await!](async/async-await.md)
- [Future](async/future.md)
- [Pin and Unpin](async/pin-unpin.md)
- [Stream](async/stream.md)

View File

@ -0,0 +1 @@
# async and await!

1
zh/src/async/future.md Normal file
View File

@ -0,0 +1 @@
# Future

1
zh/src/async/intro.md Normal file
View File

@ -0,0 +1 @@
# Async/Await

View File

@ -0,0 +1 @@
# Pin and Unpin

1
zh/src/async/stream.md Normal file
View File

@ -0,0 +1 @@
# Stream

View File

@ -0,0 +1 @@
# Char, Bool and Unit

View File

@ -0,0 +1 @@
# Functions

Some files were not shown because too many files have changed in this diff Show More