2025-12-16 10:20:31 -07:00
|
|
|
# cargo deb
|
|
|
|
|
|
|
|
|
|
> Create Debian packages from Cargo projects.
|
2026-06-12 17:51:25 -06:00
|
|
|
> Note: This is not a built-in Cargo command, you need to install it first.
|
2025-12-16 10:20:31 -07:00
|
|
|
> More information: <https://github.com/kornelski/cargo-deb>.
|
|
|
|
|
|
|
|
|
|
- Create a Debian package from a project:
|
|
|
|
|
|
|
|
|
|
`cargo deb`
|
|
|
|
|
|
|
|
|
|
- Write the `.deb` file to the specified file or directory:
|
|
|
|
|
|
|
|
|
|
`cargo deb {{[-o|--output]}} {{path/to/file_or_directory}}`
|
|
|
|
|
|
|
|
|
|
- Compile for the specified Rust target triple:
|
|
|
|
|
|
|
|
|
|
`cargo deb --target {{x86_64-unknown-linux-gnu}}`
|
|
|
|
|
|
|
|
|
|
- Select which package to use in a Cargo workspace:
|
|
|
|
|
|
|
|
|
|
`cargo deb {{[-p|--package]}} {{package_name}}`
|
|
|
|
|
|
|
|
|
|
- Immediately install the created package:
|
|
|
|
|
|
|
|
|
|
`cargo deb --install`
|