From 1ee4427751c37017a9703618902dfd03f2cf679a Mon Sep 17 00:00:00 2001 From: kazeno Date: Thu, 15 Jan 2026 20:35:13 +0800 Subject: [PATCH] update workflows --- .github/workflows/main.yml | 4 ++-- book.toml | 6 ++++-- src/ch14-04-installing-binaries.md | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6ca3db0..89cd190 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -25,8 +25,8 @@ jobs: - name: Install mdbook & mdbook-typst-pdf run: | mkdir bin - curl -sSL https://github.com/rust-lang/mdBook/releases/download/v0.4.49/mdbook-v0.4.49-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=bin - curl -sSL https://github.com/KaiserY/mdbook-typst-pdf/releases/download/v0.6.3/mdbook-typst-pdf-x86_64-unknown-linux-musl.tar.xz | tar -xJ --directory=bin --strip-components 1 + curl -sSL https://github.com/rust-lang/mdBook/releases/download/v0.5.2/mdbook-v0.5.2-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=bin + curl -sSL https://github.com/KaiserY/mdbook-typst-pdf/releases/download/v0.7.0/mdbook-typst-pdf-x86_64-unknown-linux-musl.tar.xz | tar -xJ --directory=bin --strip-components 1 echo "$(pwd)/bin" >> ${GITHUB_PATH} - name: Install font run: | diff --git a/book.toml b/book.toml index f8fb7d1..2d84b18 100644 --- a/book.toml +++ b/book.toml @@ -16,7 +16,9 @@ additional-css = [ ] additional-js = ["ferris.js"] git-repository-url = "https://github.com/KaiserY/trpl-zh-cn/tree/main" -edit-url-template = "https://github.com/KaiserY/trpl-zh-cn/edit/main/{path}" + +[output.html.search] +use-boolean-and = true [output.typst-pdf] custom-template = "custom-template.typ" @@ -25,4 +27,4 @@ section-number = true rust-book = true [rust] -edition = "2021" +edition = "2024" diff --git a/src/ch14-04-installing-binaries.md b/src/ch14-04-installing-binaries.md index 9e0ce82..51d8b90 100644 --- a/src/ch14-04-installing-binaries.md +++ b/src/ch14-04-installing-binaries.md @@ -5,7 +5,7 @@ `cargo install` 命令用于在本地安装和使用二进制 crate。它并不打算替换系统中的包;它意在作为一个方便 Rust 开发者们安装其他人已经在 [crates.io](https://crates.io/) 上共享的工具的手段。只有拥有二进制目标文件的包能够被安装。**二进制目标** 文件是在 crate 有 *src/main.rs* 或者其他指定为二进制文件时所创建的可执行程序,这不同于自身不能执行但适合包含在其他程序中的库目标文件。通常 crate 的 *README* 文件中有该 crate 是库、二进制目标还是两者兼有的信息。 -所有来自 `cargo install` 的二进制文件都安装到 Rust 安装根目录的 *bin* 文件夹中。如果你是使用 *rustup.rs* 来安装 Rust 且没有自定义任何配置,这个目录将是 *$HOME/.cargo/bin*。确保将这个目录添加到 `$PATH` 环境变量中就能够运行通过 `cargo install` 安装的程序了。 +所有来自 `cargo install` 的二进制文件都安装到 Rust 安装根目录的 *bin* 文件夹中。如果你是使用 *rustup.rs* 来安装 Rust 且没有自定义任何配置,这个目录将是 `$HOME/.cargo/bin`。确保将这个目录添加到 `$PATH` 环境变量中就能够运行通过 `cargo install` 安装的程序了。 例如,第十二章提到的叫做 `ripgrep` 的用于搜索文件的 `grep` 的 Rust 实现。为了安装 `ripgrep` 运行如下: