add new chinese translations

This commit is contained in:
2024-12-30 15:25:56 +08:00
parent a850046d7b
commit 0d798759fd
5418 changed files with 105800 additions and 7052 deletions

View File

@@ -1,37 +1,37 @@
# cargo
> 管理 Rust 项目及其模块依赖crates)。
> 一些子命令如 `build`,具有自己的用文档。
> 更多信息:<https://doc.rust-lang.org/cargo>.
> 管理 Rust 项目及其模块依赖crate
> 一些子命令如 `build` 有自己的使用文档。
> 更多信息:<https://doc.rust-lang.org/cargo>
- 搜索
- 搜索 crates
`cargo search {{搜索关键词}}`
`cargo search {{search_string}}`
- 下载二进制包(crate)
- 安装一个二进制 crate
`cargo install {{包名}}`
`cargo install {{crate_name}}`
- 列出已安装的二进制包(crate)
- 列出已安装的二进制 crates
`cargo install --list`
- 在指定目录 (或默认情况下在当前工作目录) 中创建一个新的二进制或库 Rust项目
- 在指定目录(默认是当前工作目录中创建一个新的二进制或库 Rust 项目:
`cargo init --{{bin|lib}} {{path/to/directory}}`
- 向当前目录的 `Cargo.toml` 添加一个依赖:
- 向当前目录`Cargo.toml` 添加一个依赖:
`cargo add {{依赖项目}}`
`cargo add {{dependency}}`
- 使用 release 模式在当前目录中构建 Rust 项目:
- 使用发布配置构建当前目录中 Rust 项目:
`cargo build --release`
- 使用最新的编译器当前目录中构建 Rust 项目 (需要 `rustup`)
- 使用 nightly 编译器构建当前目录中 Rust 项目(需要 `rustup`
`cargo +nightly build`
- 使用特定数量的线程构建 (默认逻辑 CPU 的数量)
- 使用特定线程构建(默认逻辑 CPU 的数量
`cargo build --jobs {{线程数}}`
`cargo build --jobs {{number_of_threads}}`