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
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