« Minimal Reproducible »

Home Tags About GitHub

compile-into-bin-and-change-the-binary-name

Published at 2024-01-15
Last update over 365 days ago Licensed under CC BY-NC-SA 4.0 langsrustcargo

According to:

https://www.rustadventure.dev/building-a-digital-garden-cli/structopt-0.3/changing-the-name-of-the-default-cargo-binary

In the Cargo.toml:

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

How to get the bin file

When you try cargo run or cargo build, it automatically build a bin file called like target/release/rust.

« Minimal Reproducible »

Powered by Astro