diff --git a/Cargo.lock b/Cargo.lock
index 2e0ce8e..dcdcca2 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -329,6 +329,7 @@ dependencies = [
"anyhow",
"clap",
"ecr",
+ "indicatif",
]
[[package]]
diff --git a/crates/ecr-cli/Cargo.toml b/crates/ecr-cli/Cargo.toml
index 4295632..60a4693 100644
--- a/crates/ecr-cli/Cargo.toml
+++ b/crates/ecr-cli/Cargo.toml
@@ -21,3 +21,6 @@ clap = { version = "4", features = ["derive", "env"] }
# Error handling
anyhow = "1"
+
+# Progress bar rendering of library progress events
+indicatif = "0.18"
diff --git a/crates/ecr-cli/src/main.rs b/crates/ecr-cli/src/main.rs
index df1aea6..0e638cc 100644
--- a/crates/ecr-cli/src/main.rs
+++ b/crates/ecr-cli/src/main.rs
@@ -1,4 +1,5 @@
mod cli;
+mod progress;
use std::path::{Path, PathBuf};
@@ -11,6 +12,7 @@ use ecr::config::Config;
use ecr::exec::ExecOptions;
use ecr::mount::BindTarget;
use ecr::{kernel, qemu, qemu_vm, utils, veprintln, verbose, PrepareRequest, RootfsCache};
+use progress::TermProgress;
fn main() -> Result<()> {
let args = Args::parse();
@@ -18,6 +20,9 @@ fn main() -> Result<()> {
// Initialise verbosity before anything else so all downstream code can use veprintln!.
verbose::set(args.verbose);
+ // Render library progress (bars/spinners) on the terminal
+ let progress = TermProgress::new();
+
// Load config file
let config = Config::load()?;
@@ -38,7 +43,7 @@ fn main() -> Result<()> {
arch: args.arch.clone().unwrap_or_default(),
no_cache: args.no_cache,
};
- let rootfs = cache.prepare(&request, &ecr::NoProgress)?;
+ let rootfs = cache.prepare(&request, &progress)?;
// Branch based on --kernel flag
// Option