use canic_installer::canister_build::{
CanisterBuildProfile, build_current_workspace_canister_artifact,
};
fn main() {
if let Err(err) = run() {
eprintln!("{err}");
std::process::exit(1);
}
}
fn run() -> Result<(), Box<dyn std::error::Error>> {
let canister_name = std::env::args()
.nth(1)
.ok_or_else(|| "usage: canic-build-canister-artifact <canister_name>".to_string())?;
let output =
build_current_workspace_canister_artifact(&canister_name, CanisterBuildProfile::current())?;
println!("{}", output.wasm_gz_path.display());
Ok(())
}