tldr/pages.zh/common/cargo-generate-lockfile.md

10 lines
382 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

# cargo generate-lockfile
> 为当前包生成 Cargo.lock 文件。类似于 cargo update但选项更少。
> 如果锁定文件已经存在,它将使用每个包的最新版本重新构建。
> 更多信息:<https://doc.rust-lang.org/stable/cargo/commands/cargo-generate-lockfile.html>.
- 使用每个包的最新版本生成Cargo.lock文件
`cargo generate-lockfile`