Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Change only app name, not lib name in Rust

In rust, I created one package and now I want to change only output app name without changing package name.

Below is the content of Cargo.toml file

[package]
authors = ["Rust exam"]
edition = "2021"
name = "rust-pack"
description = "Rebuilt for Scale"
version = "1.10.0"
license = "Apache-2.0"

[dependencies]
base64 = "0.12.3"
clap = "2.33.1"
serde = "1.0.132"
serde_json = "1.0.73"
serde_yaml = "0.8.23"
tempfile = "3.2.0"

[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]

When I input cargo build, it makes rust-exam and librust-exam.
I want to only change rust-exam, not change package name.
How can I do for that?

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

Please input below.

[[bin]]
name = "rust-output"
path = "src/main.rs"
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading