Skip to main content

canic_installer/
lib.rs

1//! Published installer helpers for downstream Canic workspaces.
2
3use std::process::Command;
4
5pub mod bootstrap_store;
6pub mod canister_build;
7pub mod install_root;
8pub mod release_set;
9mod workspace_discovery;
10
11pub(crate) fn cargo_command() -> Command {
12    let cargo = std::env::var_os("CARGO").unwrap_or_else(|| "cargo".into());
13    let mut command = Command::new(cargo);
14
15    if let Some(toolchain) = std::env::var_os("RUSTUP_TOOLCHAIN") {
16        command.env("RUSTUP_TOOLCHAIN", toolchain);
17    }
18
19    command
20}