mirror of
https://github.com/gnu4cn/rust-lang-zh_CN.git
synced 2026-08-22 14:13:28 +08:00
Update Ch00
This commit is contained in:
24
README.md
24
README.md
@@ -21,28 +21,34 @@ rustc 1.68.0 (2c8cc3432 2023-03-06)
|
|||||||
### 在 Linux 系统上
|
### 在 Linux 系统上
|
||||||
|
|
||||||
```console
|
```console
|
||||||
$ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
|
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
|
||||||
$ cargo install mdbook
|
cargo install mdbook
|
||||||
```
|
```
|
||||||
|
|
||||||
### 在 Windows 上
|
### 在 Windows 上
|
||||||
|
|
||||||
|
在 “Powershell(管理员)”("Administrator: Windows Powershell") 中,先安装 choco
|
||||||
|
|
||||||
```powershell
|
```powershell
|
||||||
# 在 "Administrator: Windows Powershell" 中,先安装 choco
|
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
|
||||||
> Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
|
|
||||||
# 经由 choco 安装 msys2
|
|
||||||
> choco install -y msys2
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
经由 `choco` 安装 `msys2`
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
choco install -y msys2
|
||||||
|
```
|
||||||
|
|
||||||
|
在 `msys2` 中安装 `mdbook`
|
||||||
|
|
||||||
```console
|
```console
|
||||||
# 在 msys2 中安装 mdbook
|
pacman -S mingw-w64-x86_64-mdbook
|
||||||
$ pacman -S mingw-w64-x86_64-mdbook
|
|
||||||
```
|
```
|
||||||
|
|
||||||
安装好 `mdbook` 后, 带一些命令行参数和开关运行服务器:
|
安装好 `mdbook` 后, 带一些命令行参数和开关运行服务器:
|
||||||
|
|
||||||
```console
|
```console
|
||||||
$ mdbook serve ~/rust-lang-zh_CN -p 8080 -n 127.0.0.1 --open
|
mdbook serve ~/rust-lang-zh_CN -p 8080 -n 127.0.0.1 --open
|
||||||
```
|
```
|
||||||
|
|
||||||
> 注:当在 Windows 系统上时,咱们要在 `msys2` 的终端窗口中运行此命令。
|
> 注:当在 Windows 系统上时,咱们要在 `msys2` 的终端窗口中运行此命令。
|
||||||
|
|||||||
Reference in New Issue
Block a user