Course lesson
Rename the default Cargo binary to be different than the package name
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.
- Duration
- 1 min
- Access
- Pro
- Transcript
- Available
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.