CARGO-PACKAGE(1) General Commands Manual CARGO-PACKAGE(1) (NAME) cargo-package - tarball (SYNOPSIS) cargo package [] (DESCRIPTION) .crate . target/package . : 1. . o (path dependencies) version . Cargo path . dev-dependencies . 2. .crate. o Cargo.toml . o [patch] [replace] [workspace] . o Cargo.lock . --exclude-lockfile . --locked cargo-install(1) . o .cargo_vcs_info.json checkout VCS (dirty) . o (Symlinks) . o [include] [exclude] . 3. .crate . o . --no-verify . 4. . include exclude . . .cargo_vcs_info.json (.cargo_vcs_info.json format) .cargo_vcs_info.json : { "git": { "sha1": "aac20b6e7e543e6dd4118b246c77225e3a3a1302", "dirty": true }, "path_in_vcs": "" } dirty Git . path_in_vcs . JSON cargo-metadata(1) . VCS (best-effort) . . tarball VCS ..SH " (OPTIONS)" (Package Options) -l, --list . --no-verify . --no-metadata ( ) . --allow-dirty VCS . --exclude-lockfile (lock file) . . ( cargo install --locked). . --index index URL (index) . --registry registry cargo publish --help . crate . --message-format fmt . --list . -Zunstable-options . : o human (): . o json: JSON . JSON ( Newline delimited JSON). { /* The Package ID Spec of the package. */ "id": "path+file:///home/foo#0.0.0", /* Files of this package */ "files" { /* Relative path in the archive file. */ "Cargo.toml.orig": { /* Where the file is from. - "generate" for file being generated during packaging - "copy" for file being copied from another location. */ "kind": "copy", /* For the "copy" kind, it is an absolute path to the actual file content. For the "generate" kind, it is the original file the generated one is based on. */ "path": "/home/foo/Cargo.toml" }, "Cargo.toml": { "kind": "generate", "path": "/home/foo/Cargo.toml" }, "src/main.rs": { "kind": "copy", "path": "/home/foo/src/main.rs" } } } ( --manifest-path ). (workspace) . workspace.default-members . ( --workspace) (crate) . -p spec, --package spec . SPEC cargo-pkgid(1) . glob * ? [] . glob Cargo . --workspace . --exclude SPEC . --workspace . glob * ? [] . glob Cargo . (Compilation Options) --target triple (target) . . (host) . (triple) --- . : o rustc --print target-list. o "host-tuple" . ( xtask ). o . Custom Target Lookup Path . build.target . Cargo (artifacts) . (build cache) . --target-dir directory . CARGO_TARGET_DIR build.target-dir . target . (Feature Selection) . default . . -F features, --features features . package-name/feature-name . . --all-features . --no-default-features default . --manifest-path path Cargo.toml. Cargo Cargo.toml . --locked Cargo.lock . Cargo : o lock . o Cargo lock . (deterministic builds) CI . --offline Cargo . Cargo . Cargo . . Cargo crate . cargo-fetch(1) . net.offline . --frozen --locked --offline . (Miscellaneous Options) -j N, --jobs N . build.jobs . . . default . 0 . --keep-going crate . fails works cargo package -j1 ( Cargo ) cargo package -j1 --keep-going . (Display Options) -v, --verbose . " " . term.verbose . -q, --quiet cargo . term.quiet . --color when . : o auto (): . o always: . o never: . term.color . +toolchain Cargo rustup cargo + rustup ( +stable +nightly). rustup . --config KEY=VALUE PATH Cargo . TOML KEY=VALUE . . . -C PATH . cargo (Cargo.toml) .cargo/config.toml . cargo -C path/to/my-project build. nightly -Z unstable-options ( #10098 ). -h, --help . -Z flag ( nightly) Cargo. cargo -Z help . (ENVIRONMENT) Cargo . (EXIT STATUS) o 0: Cargo . o 101: Cargo . (EXAMPLES) 1. .crate : cargo package (SEE ALSO) cargo(1), cargo-publish(1) CARGO-PACKAGE(1)