1
0
Fork 0

Add a hint to failed builds

This commit is contained in:
Alex Charlton 2023-03-26 22:59:28 -07:00
parent e59dc33aaf
commit 0f7d9827d8

View file

@ -298,7 +298,7 @@ pub fn bundle(package: &str, args: &[String], universal: bool) -> Result<()> {
let bin_path = target_base.join(binary_basename(package, compilation_target)); let bin_path = target_base.join(binary_basename(package, compilation_target));
let lib_path = target_base.join(library_basename(package, compilation_target)); let lib_path = target_base.join(library_basename(package, compilation_target));
if !bin_path.exists() && !lib_path.exists() { if !bin_path.exists() && !lib_path.exists() {
anyhow::bail!("Could not find built library at '{}'", lib_path.display()); anyhow::bail!("Could not find built library at '{}'.\nHint: Maybe you forgot to add:\n\n[lib]\ncrate-type = [\"cdylib\"]\n\nto your Cargo.toml?\n", lib_path.display());
} }
eprintln!(); eprintln!();