cargo-bin-lib

crates.io Docs

Cargo subcommand for more ergonomically creating a bin or lib crate.

Instead of cargo new --bin <args>, simply invoke cargo bin <args>. The same goes for lib.

No more confusion whether --bin or --lib is the default!

Installation

cargo install cargo-bin-lib