diff --git a/.cargo/config.toml b/.cargo/config.toml index de18d3f..7a298d6 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -1,3 +1,3 @@ [build] -rustflags = ["-Clink-arg=-fuse-ld=lld"] +rustflags = ["-Clink-arg=-fuse-ld=mold", "-Ctarget-cpu=native"] # rustflags = ["-Clink-arg=-fuse-ld=lld", "-Zthreads=8"] diff --git a/Cargo.toml b/Cargo.toml index b846f52..f3e8da9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,4 +15,9 @@ rayon = "1.10.0" [profile.dev] debug = 0 + +[profile.release] +lto = true +codegen-units = 1 +panic = "abort" # codegen-backend = "cranelift" diff --git a/src/main.rs b/src/main.rs index 8c922f9..5f80dcc 100644 --- a/src/main.rs +++ b/src/main.rs @@ -63,12 +63,7 @@ fn main() { } let export_path = match cli.export.clone() { Some(e) => e, - None => cli.image[0] - // .parent() - // Check output here, not later - // .expect("Couldn't find a place to save the output") - .with_file_name("Palettes.html"), - // .to_path_buf(), + None => cli.image[0].with_file_name("Palettes.html"), }; let mode = match cli.mode { Some(f) => f, @@ -96,7 +91,6 @@ fn main() { let colorblobs: Vec<_> = cli .image .par_iter() - // .progress_with(pb_general.clone()) .map(|image| { let pb = m.add(ProgressBar::new(cli.runs.unwrap_or(8))); pb.enable_steady_tick(Duration::from_millis(100)); @@ -110,7 +104,7 @@ fn main() { pb_general.finish_and_clear(); if cli.verbosity { - println!("Done in {}", HumanDuration(started.elapsed())); + println!("[INFO] Done in {}", HumanDuration(started.elapsed())); } export_html(export_path, colorblobs); } diff --git a/src/utilities.rs b/src/utilities.rs index d0563ef..3f9452a 100644 --- a/src/utilities.rs +++ b/src/utilities.rs @@ -106,7 +106,7 @@ pub(crate) fn export_html(export_path: PathBuf, color_vec: Vec) { } write!(out, "").unwrap(); println!( - "Exported pallete to file: {}", + "[INFO] Exported pallete to file: {}", export_path.to_string_lossy() ); }