Skip to main content

Module trim_paths

Module trim_paths 

Source
Expand description

Path prefix remapping for RFC 3127 trim-paths.

Re-exportsΒ§

use std::collections::BTreeMap; πŸ”’
use std::collections::btree_map::Entry; πŸ”’
use std::ffi::OsString; πŸ”’
use std::io::Write; πŸ”’
use std::path::Path; πŸ”’
use std::path::PathBuf; πŸ”’
use cargo_util::ProcessBuilder; πŸ”’
use cargo_util_schemas::manifest::TomlTrimPaths; πŸ”’
use serde::Serialize; πŸ”’
use serde::Serialize; πŸ”’
use tracing::debug; πŸ”’
use super::BuildRunner; πŸ”’
use super::Unit; πŸ”’
use crate::util::errors::CargoResult; πŸ”’
use crate::util::hex; πŸ”’
use crate::util::path_args; πŸ”’
use cargo_util::collections::HashSet; πŸ”’

StructsΒ§

Remap πŸ”’
UnremapFile πŸ”’
On-disk schema of the unremap file.

ConstantsΒ§

CURRENT_UNREMAP_VERSION πŸ”’
The current version of the unremap file.
UNREMAP_SUFFIX πŸ”’
Filename suffix of the unremap file.
WS_REMAP_ENV πŸ”’
This is an internal contract with rustc bootstrap, which needs workspace sources remapped to /rust{c,-dev}/<sha>.

FunctionsΒ§

append_unremap_suffix πŸ”’
Appends the unremap file suffix to an artifact path.
build_dir_remap πŸ”’
Remap all paths pointing to build.build-dir, i.e., [BUILD_DIR]/debug/deps/foo-[HASH].dwo would be remapped to /cargo/build-dir/debug/deps/foo-[HASH].dwo (note the /cargo/build-dir prefix).
git_checkout πŸ”’
Finds the checkout root and revision directory name of a git dependency.
join_remap πŸ”’
package_remap πŸ”’
Path prefix remap rules for dependencies.
should_emit_unremap_file πŸ”’
Whether an unremap file is worth emitting beside its artifacts.
sysroot_remap πŸ”’
Path prefix remap rules for sysroot.
trim_paths_args πŸ”’
Generates the --remap-path-scope and --remap-path-prefix for RFC 3127. See also the trim-paths profile option.
trim_paths_args_rustdoc πŸ”’
Like trim_paths_args but for rustdoc invocations.
trim_paths_remap πŸ”’
Computes the <from>=<to> path remap pairs for RFC 3127 trim-paths.
workspace_remap πŸ”’
Path prefix remap rules for dependencies within workspaces.
write_unremap_file πŸ”’
Writes the unremap file for a unit’s final artifacts.

Type AliasesΒ§

RemapPair πŸ”’
A single <from>=<to> remap rule.