pub fn get_user_crate_name(dir: &Path) -> Result<String, ExecutionError> {
    let manifest = cargo_toml::Manifest::from_path(dir.join("Cargo.toml"))
        .map_err(|err| ExecutionError::GetManifestFailed { source: err })?;
    let name = manifest
        .package
        .ok_or(ExecutionError::CrateNameNotPresentInManifest)?
        .name;
    Ok(name)
}
Gets the name of the user's crate from their `Cargo.toml` (assumed to be in
the root of the given directory).
packages/perseus-cli/src/lib.rs