Skip to content

Commit

Permalink
Rename the binary to be garden
Browse files Browse the repository at this point in the history
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.

```toml
[[bin]]
name = "garden"
path = "src/main.rs"
```

Then we see `./target/debug/garden` get created when we
`cargo run` or `cargo build`.
  • Loading branch information
ChristopherBiscardi committed Dec 29, 2020
1 parent e6f08a3 commit 74fb53c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Cargo.toml
Expand Up @@ -6,4 +6,8 @@ edition = "2018"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[[bin]]
name = "garden"
path = "src/main.rs"

[dependencies]

0 comments on commit 74fb53c

Please sign in to comment.