## Module ops

Source

## Modules§

cargo_add
  Core of cargo-add command
cargo_clean 🔒
cargo_compile 🔒
  The entry point for starting the compilation process for commands like `build`, `test`, `doc`, `rustc`, etc.
cargo_config
  Implementation of `cargo config` subcommand.
cargo_doc 🔒
cargo_fetch 🔒
cargo_install 🔒
cargo_new 🔒
cargo_output_metadata 🔒
cargo_package 🔒
cargo_pkgid 🔒
cargo_read_manifest 🔒
cargo_remove
  Core of cargo-remove command
cargo_run 🔒
cargo_test 🔒
cargo_uninstall 🔒
cargo_update 🔒
common_for_install_and_uninstall 🔒
fix 🔒
  High-level overview of how `fix` works:
lockfile 🔒
registry 🔒
  Operations that interact with the registry web API.
resolve 🔒
  High-level APIs for executing the resolver.
tree
  Implementation of `cargo tree`.
vendor 🔒

## Structs§

CleanContext
CleanOptions
CompileOptions
  Contains information about how a package should be compiled.
DocOptions
  Strongly typed options for the `cargo doc` command.
ExportInfo
  This is the structure that is serialized and displayed to the user.
FetchOptions
FixOptions
InstallTracker
  On-disk tracking for which package installed which binary.
NewOptions
OutputMetadataOptions
OwnersOptions
PackageOpts
PublishOpts
TestOptions
UnitGenerator
  The context needed for generating root units, which are packages the user has requested to compile.
UpdateOptions
VendorOptions
WorkspaceResolve
  Result for `resolve_ws_with_opts`.

## Enums§

CompileFilter
  Filter to apply to the root package to select which Cargo targets will be built. (examples, bins, benches, tests, …)
EditionFixMode
  The behavior of `--edition` migration.
FilterRule
  Indicates which Cargo targets will be selected to be built.
LibRule
  Indicates whether or not the library target gets included.
NewProjectKind
OutputFormat
  Format of rustdoc `--output-format`.
PackageMessageFormat
  Message format for `cargo package`.
Packages
  Represents the selected packages that will be built.
RegistryCredentialConfig
  Registry settings loaded from config files.
RegistryOrIndex
  Represents either `--registry` or `--index` argument, which is mutually exclusive.
VersionControl

## Functions§

add_overrides
  Read the `paths` configuration variable to discover all path overrides that have been configured.
check_dep_has_version 🔒
  Returns true if the dependency is either git or path, false otherwise Error if a git/path dep is transitive, but has no version (registry source). This check is performed on dependencies before publishing or packaging
check_yanked
clean
  Cleans various caches.
compile
  Compiles!
compile_with_exec
  Like `compile` but allows specifying a custom `Executor` that will be able to intercept build calls and add custom logic.
compile_ws
  Like `compile_with_exec` but without warnings from manifest parsing.
create_bcx
  Prepares all required information for the actual compilation.
doc
  Main method for `cargo doc`.
fetch
  Executes `cargo fetch`.
fix
fix_edition
  Performs the actions for the `-Zfix-edition` flag.
fix_exec_rustc
  Entry point for `cargo` running as a proxy for `rustc`.
fix_get_proxy_lock_addr
  Provide the lock address when running in proxy mode
generate_lockfile
get_resolved_packages
info
init
install
install_list
  Display a list of installed binaries.
load_pkg_lockfile
modify_owners
new
output_metadata
  Loads the manifest, resolves the dependencies of the package to the concrete used versions - considering overrides - and writes all dependencies in a JSON format to stdout.
package
  Packages an entire workspace.
pkgid
print
  Executes `rustc --print <VALUE>`.
print_lockfile_changes
  Prints lockfile change statuses.
publish
read_package
registry_login
registry_logout
resolve_all_features
  Gets all of the features enabled for a package, plus its dependencies’ features.
resolve_root
  Determines the root directory where installation is done.
resolve_to_string
  Generate a toml String of Cargo.lock from a Resolve.
resolve_with_previous
  Resolves all dependencies for a package using an optional previous instance of resolve to guide the resolution process.
resolve_ws
  Resolves all dependencies for the workspace using the previous lock file as a guide if present.
resolve_ws_with_opts
  Resolves dependencies for some packages of the workspace, taking into account `paths` overrides and activated features.
run
run_benches
  Compiles and runs benchmarks.
run_tests
  Compiles and runs tests.
search
uninstall
update_lockfile
upgrade_manifests
vendor
write_manifest_upgrades
  Update manifests with upgraded versions, and write to disk. Based on cargo-edit. Returns true if any file has changed.
write_pkg_lockfile
  Ensure the resolve result is written to fisk
yank