|
|
|
|
@ -8,9 +8,9 @@
|
|
|
|
|
|
|
|
|
|
PS:
|
|
|
|
|
|
|
|
|
|
* 对照源码位置:[https://github.com/rust-lang/book/tree/main/src][source]
|
|
|
|
|
* 注意源码 `src` 目录一般会比 [https://doc.rust-lang.org/book/](https://doc.rust-lang.org/book/) 要新,如果遇到冲突建议对照 `src` 目录。
|
|
|
|
|
* 每章翻译开头都带有官方链接和 commit hash 的注释,若发现与官方不一致,欢迎 Issue 或 PR
|
|
|
|
|
- 对照源码位置:[https://github.com/rust-lang/book/tree/main/src][source]
|
|
|
|
|
- 注意源码 `src` 目录一般会比 [https://doc.rust-lang.org/book/](https://doc.rust-lang.org/book/) 要新,如果遇到冲突建议对照 `src` 目录。
|
|
|
|
|
- 每章翻译开头都带有官方链接和 commit hash 的注释,若发现与官方不一致,欢迎 Issue 或 PR
|
|
|
|
|
|
|
|
|
|
[source]: https://github.com/rust-lang/book/tree/main/src
|
|
|
|
|
|
|
|
|
|
@ -26,7 +26,7 @@ PS:
|
|
|
|
|
|
|
|
|
|
全局安装 mdbook
|
|
|
|
|
|
|
|
|
|
``` bash
|
|
|
|
|
```bash
|
|
|
|
|
cargo install mdbook
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
@ -36,13 +36,10 @@ cd 到项目目录,然后开始构建。构建好的静态文档会出现在 "
|
|
|
|
|
mdbook build
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
### 文档撰写
|
|
|
|
|
|
|
|
|
|
可以通过任意的 http 服务器来预览构建的文档。举个例子:
|
|
|
|
|
在本地部署 HTTP 服务器以阅读文档:
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
cargo install simple-http-server
|
|
|
|
|
simple-http-server .\book\html\ -i
|
|
|
|
|
mdbook serve
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
## 社区资源
|
|
|
|
|
@ -62,6 +59,7 @@ simple-http-server .\book\html\ -i
|
|
|
|
|
本翻译主要采用 [mdBook](https://github.com/rust-lang-nursery/mdBook) 格式。同时支持 [GitBook](https://github.com/GitbookIO/gitbook),但会缺失部分功能,如一些代码没有语法高亮。
|
|
|
|
|
|
|
|
|
|
本翻译加速查看站点有:
|
|
|
|
|
- 深圳站点:<http://120.78.128.153/rustbook>
|
|
|
|
|
|
|
|
|
|
- 深圳站点:<http://120.78.128.153/rustbook>
|
|
|
|
|
|
|
|
|
|
[GitBook.com](https://www.gitbook.com/) 地址:<https://kaisery.github.io/trpl-zh-cn/>
|
|
|
|
|
|