Skip to main content

default_crate_name

Function default_crate_name 

Source
pub fn default_crate_name(dar: &Path) -> String
Expand description

Derive a crate name from a DAR path: its file stem with the trailing version dropped, sanitised to a valid Cargo package name (splice-amulet-0.1.14.dar → splice-amulet).

The version is left out on purpose: a DAR version bump should not rename the crate a caller depends on (the crate version carries it instead).