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 π
- Unremap
File π - 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].dwowould be remapped to/cargo/build-dir/debug/deps/foo-[HASH].dwo(note the/cargo/build-dirprefix). - 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-scopeand--remap-path-prefixfor RFC 3127. See also thetrim-pathsprofile option. - trim_
paths_ πargs_ rustdoc - Like
trim_paths_argsbut 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Β§
- Remap
Pair π - A single
<from>=<to>remap rule.