In ./target/debug/
we can see the binary name: digital-garden-steps
. This is the name of our package and we want the actual binary that users install to be named garden
instead.
To do this we can change the auto-discovered src/main.rs
binary and change the name using a bin
config in the Cargo.toml
file.
[[bin]]
name = "garden"
path = "src/main.rs"
Then we see ./target/debug/garden
get created when we
cargo run
or cargo build
.