# Module cargo::ops::cargo_package

source ·

## Structs§

- ArchiveFile 🔒
- GitVcsInfo 🔒
- PackageOpts
- VcsInfo 🔒

## Enums§

- FileContents 🔒
- GeneratedFile 🔒

## Constants§

- ORIGINAL_MANIFEST_FILE 🔒
- VCS_INFO_FILE 🔒

## Functions§

- build_ar_list 🔒
  Builds list of files to archive.
- build_lock 🔒
  Construct `Cargo.lock` for the package to be published.
- check_filename 🔒
- check_for_file_and_add 🔒
- check_metadata 🔒
- check_repo_state 🔒
  Checks if the package source is in a git DVCS repository. If git, and the source is dirty (e.g., has uncommitted changes), and `--allow-dirty` has not been passed, then `bail!` with an informative message. Otherwise return the sha1 hash of the current HEAD commit, or `None` if no repo is found.
- check_yanked
- compare_resolve 🔒
  Generate warnings when packaging Cargo.lock, and the resolve have changed.
- create_package 🔒
- error_custom_build_file_not_in_package 🔒
- error_on_nonexistent_file 🔒
- hash_all 🔒
- package
- package_one
  Packages a single package in a workspace, returning the resulting tar file.
- prepare_archive 🔒
  Performs pre-archiving checks and builds a list of files to archive.
- report_hash_difference 🔒
- run_verify 🔒
- tar 🔒
  Compresses and packages a list of `ArchiveFile`s and writes into the given file.