← 返回命令列表

Linux command

cargo-deb 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Create Debian package

cargo deb

Build and install locally

cargo deb --install

Specify output location

cargo deb --output [path/to/package.deb]

Build for specific target

cargo deb --target [x86_64-unknown-linux-gnu]

Set package revision

cargo deb --deb-revision [2]

Build without default features

cargo deb --no-default-features

Verbose output

cargo deb --verbose

说明

cargo deb creates binary Debian packages (.deb) from Cargo projects automatically. Uses Cargo.toml metadata and optional package.metadata.deb configuration. Output placed in target/debian/<name>_<version>-<revision>_<arch>.deb

参数

--install
Build and install package immediately
-o, --output _path_
Custom output file path
--target _triple_
Build for specified target
--deb-revision _rev_
Set Debian package revision
--no-build
Skip cargo build step
--no-strip
Don't strip debug symbols
--separate-debug-symbols
Create separate debug package
--fast
Skip some optimizations for faster build
--variant _name_
Use variant-specific configuration
-v, --verbose
Verbose output

FAQ

What is the cargo-deb command used for?

cargo deb creates binary Debian packages (.deb) from Cargo projects automatically. Uses Cargo.toml metadata and optional package.metadata.deb configuration. Output placed in target/debian/<name>_<version>-<revision>_<arch>.deb

How do I run a basic cargo-deb example?

Run `cargo deb` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does --install do in cargo-deb?

Build and install package immediately