Skip to content

voxup API Reference (generated)

Crate: voxup · Version: 0.6.0 · Target: Library (lib.rs)

The Vox toolchain multiplexer and hermetic installer

Library half of voxup, the Vox toolchain multiplexer and installer.

main.rs compiles these same module files itself. This library target exposes them to voxup’s integration tests and to vox-cli (the plugin install and verify commands):

  • [home]: home-directory resolution that refuses to guess;
  • [profiles]: the typed distribution-profile SSOT;
  • [install_plan]: pure install planning, i.e. which binaries and bundle a tier selects;
  • [uninstall]: allowlisted removal of installer-owned paths.
DependencyKind
vox-secretsNormal
vox-plugin-catalogDevelopment
ModuleDescription
home—
install_plan—
profiles—
uninstall—
Dependency Topology, diagram 13 nodes, 2 edges: voxup → vox-plugin-catalog; voxup → vox-secretsvoxupvox-plugin-catalogvox-secrets
Diagram source
graph {
direction: right
node voxup: "voxup"
node vox_plugin_catalog: "vox-plugin-catalog"
voxup -> vox_plugin_catalog
node vox_secrets: "vox-secrets"
voxup -> vox_secrets
}
KindSymbolSignatureSourceDescription
fnhome::require_homepub fn require_home() -> Result<PathBuf>crates/voxup/src/home.rs#L18-L42Resolve the user home from HOME (Unix) or HOME/USERPROFILE (Windows). Refuses to run if the value is unset or empty. Does not consult dirs::home_dir() — that helper falls back to getpwuid on macOS when HOME is empty, which would silently target the real home directory.
fnhome::assert_test_home_is_isolatedpub fn assert_test_home_is_isolated(home: &Path, temp_root: &Path, outer_home: &Path)crates/voxup/src/home.rs#L48-L63Fail immediately if home is the process’s real $HOME or is not under temp_root. Test-only guard: a botched fixture must not operate on the operator’s home directory.
fninstall_plan::binaries_for_tierpub fn binaries_for_tier<'a>(profiles: &'a Profiles, tier: &str) -> Result<&'a [String]>crates/voxup/src/install_plan.rs#L12-L14Binaries the installer must place for tier.
fninstall_plan::bundle_id_for_tierpub fn bundle_id_for_tier<'a>(profiles: &'a Profiles, tier: &str) -> Result<&'a str>crates/voxup/src/install_plan.rs#L17-L23Catalog bundle id the installer records for tier.
fninstall_plan::exe_namepub fn exe_name(binary: &str) -> Stringcrates/voxup/src/install_plan.rs#L33-L43Platform executable name for a SSOT binary id (vox → vox.exe on Windows).
structprofiles::Profilespub struct Profilescrates/voxup/src/profiles.rs#L12-L19—
structprofiles::Tierpub struct Tiercrates/voxup/src/profiles.rs#L22-L31—
structprofiles::Publishpub struct Publishcrates/voxup/src/profiles.rs#L34-L37—
fnprofiles::parsepub fn parse(yaml: &str) -> Result<Profiles, serde_yaml::Error>crates/voxup/src/profiles.rs#L40-L42Parse the SSOT from a YAML string.
fnprofiles::toolchain_rust_versionpub fn toolchain_rust_version(yaml: &str) -> Option<String>crates/voxup/src/profiles.rs#L47-L50Extract versions.rust from a workspace-toolchain.v1.yaml document.
fnprofiles::public_toml_cratespub fn public_toml_crates(toml_text: &str) -> Vec<String>crates/voxup/src/profiles.rs#L56-L70Extract crate names from _public.toml: [[crates]] name = "..." tables (current format) or a legacy crates = ["..."] string array.
fnprofiles::cargo_publish_is_falsepub fn cargo_publish_is_false(cargo_toml_text: &str) -> boolcrates/voxup/src/profiles.rs#L75-L84True iff a Cargo.toml sets [package] publish = false.
fnprofiles::validate_tierpub fn validate_tier(profiles_yaml: &str, tier: &str) -> Result<(), String>crates/voxup/src/profiles.rs#L90-L101Validate that tier names a tier declared in the distribution SSOT. Returns Ok(()) on a known tier, or Err with a human-readable message listing the valid tier names (derived from the SSOT, not hard-coded).
structuninstall::UninstallOptspub struct UninstallOptscrates/voxup/src/uninstall.rs#L28-L33—
fnuninstall::from_clipub fn from_cli(dry_run_flag: bool, apply_flag: bool) -> Selfcrates/voxup/src/uninstall.rs#L37-L49--dry-run is the default when stdin is not a TTY.
structuninstall::UninstallReportpub struct UninstallReportcrates/voxup/src/uninstall.rs#L53-L59—
enumuninstall::CargoVoxActionpub enum CargoVoxActioncrates/voxup/src/uninstall.rs#L62-L70—
enumuninstall::ProfileEditpub enum ProfileEditcrates/voxup/src/uninstall.rs#L73-L90—
fnuninstall::run_uninstallpub fn run_uninstall(opts: UninstallOpts) -> Result<UninstallReport>crates/voxup/src/uninstall.rs#L93-L96CLI entry: resolve HOME (refuse if unset) then uninstall.
fnuninstall::uninstall_atpub fn uninstall_at(home: &Path, opts: &UninstallOpts) -> Result<UninstallReport>crates/voxup/src/uninstall.rs#L101-L135Uninstall against an explicit home. Callers that construct home themselves (tests) must run crate::home::assert_test_home_is_isolated (test-only, #[cfg(test)], so not an intra-doc link) first.
fnuninstall::prune_old_toolchainspub fn prune_old_toolchains(toolchains_dir: &Path, keep_previous: usize) -> Result<Vec<PathBuf>>crates/voxup/src/uninstall.rs#L158-L230Prune old vox-<version> toolchain dirs. Fail closed (delete nothing) if toolchains/active is missing or unparseable.
fnuninstall::parse_active_versionpub fn parse_active_version(raw: &str) -> Option<String>crates/voxup/src/uninstall.rs#L234-L248Some only when the file is a single non-empty version token with no path separators.
fnuninstall::rollback_activepub fn rollback_active(toolchains_dir: &Path) -> Result<String>crates/voxup/src/uninstall.rs#L252-L297Switch toolchains/active to the next-newest remaining version and return that version. Fail closed if active is missing or unparseable.
fnuninstall::run_rollbackpub fn run_rollback() -> Result<String>crates/voxup/src/uninstall.rs#L299-L303—
fnuninstall::strip_voxup_blockpub fn strip_voxup_block(content: &str) -> Option<String>crates/voxup/src/uninstall.rs#L373-L389Remove every exact contiguous two-line block (# Added by voxup + the following PATH line). Returns None when the marker is absent.
fnuninstall::is_proven_hardlinkpub fn is_proven_hardlink(a: &Path, b: &Path) -> boolcrates/voxup/src/uninstall.rs#L507-L531Provenance: same inode (Unix) / same file index (Windows) and nlink > 1. Never glob ~/.cargo/bin/vox*.