diff --git a/README.md b/README.md index e8e8aa4d..560520a2 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Rust编程指南 -- 官方书名: Rust编程指南(The Way To Rust) -- 官方网址: https://wayto.rs +- 官方书名: Rust编程指南(Rust Course) +- 官方网址: https://course.rs - 修订时间: **尚未发行** - Rust版本:Rust edition 2021 - QQ交流群: 1009730433 diff --git a/book.toml b/book.toml index df045b2b..1ce02801 100644 --- a/book.toml +++ b/book.toml @@ -1,13 +1,13 @@ [book] authors = ["sunface"] language = "zh-CN" -title = "Rust编程指南(The Way To Rust)" +title = "Rust编程指南(Rust Course)" [output.html] additional-css = ["assets/ferris.css", "assets/theme/2018-edition.css"] additional-js = ["assets/ferris.js"] git-repository-url = "https://github.com/rustcollege" -edit-url-template = "https://github.com/rustcollege/the-way-to-rust/edit/main/{path}" +edit-url-template = "https://github.com/rustcollege/rust-course/edit/main/{path}" [output.html.fold] enable = true diff --git a/release b/release index ff028677..557826ee 100755 --- a/release +++ b/release @@ -13,7 +13,7 @@ git config user.email "cto@188.com" git add . git commit -m 'release book' git branch -M gh-pages -git remote add origin https://github.com/rustcollege/the-way-to-rust +git remote add origin https://github.com/rustcollege/rust-course ## push to github pages git push -u -f origin gh-pages \ No newline at end of file diff --git a/src/SUMMARY.md b/src/SUMMARY.md index 9aa09c0b..feef69a1 100644 --- a/src/SUMMARY.md +++ b/src/SUMMARY.md @@ -62,7 +62,8 @@ - [条件编译、条件依赖](cargo/feature.md) - [配置参数(todo)](cargo/manifest.md) - [自定义构建脚本](cargo/build-js.md) - + - [Cargo profile](cargo/profile.md) + - [测试](test/intro.md) - [单元测试](test/unit.md) - [集成测试](test/intergration.md) diff --git a/src/about-book.md b/src/about-book.md index 39fb0a61..bfdcefb3 100644 --- a/src/about-book.md +++ b/src/about-book.md @@ -4,8 +4,8 @@ ## 关于本书 -- 官方书名: Rust编程指南(The Way To Rust) -- 官方网址: https://wayto.rs +- 官方书名: Rust编程指南(Rust Course) +- 官方网址: https://course.rs - 修订时间: 尚未发行 - Rust版本:Rust edition 2021 - QQ交流群: 1009730433 diff --git a/src/cargo/profile.md b/src/cargo/profile.md new file mode 100644 index 00000000..7f6d100d --- /dev/null +++ b/src/cargo/profile.md @@ -0,0 +1,4 @@ +# Cargo profile + + +## custom profiles (rust 1.57.0) diff --git a/writing-material/posts/performance.md b/writing-material/posts/performance.md index 58a5c79a..d1286bb6 100644 --- a/writing-material/posts/performance.md +++ b/writing-material/posts/performance.md @@ -4,4 +4,15 @@ ## crates -1. [高性能Mutex库](https://github.com/Amanieu/parking_lot) \ No newline at end of file +1. [高性能Mutex库](https://github.com/Amanieu/parking_lot) + +## 不要通过环境变量来控制在不同环境下的tracing行为 + +这种控制消耗很大,随着rust 1.57.0版本发布,可以使用自定义cargo profile的方式来实现 + +cargo profile可以做: +Enable costlier tracing/logging/debug on staging builds, or force LTO only for production builds. + + +为何不要用环境变量来控制tracing库的行为: +If your app is in any way performance sensitive you are carrying a significant cost for that. \ No newline at end of file diff --git a/writing-material/posts/rust-analyser.md b/writing-material/posts/rust-analyser.md new file mode 100644 index 00000000..d3d65d42 --- /dev/null +++ b/writing-material/posts/rust-analyser.md @@ -0,0 +1,3 @@ +## 可以为rust-analyzer指定一个check文件夹,避免构建的cache被lock住 + +You can already setup rust-analyzer to use different folder. I set `Check On Save` to `check` and in `Check On Save: Extra Args` to `--target-dir target/rust-analyzer-target`. \ No newline at end of file