Bin name different from package name

Is it possible to name the created binary in this format: "prefix.package_name"?

I tried:

[package]
name = "my_app"

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

# deps…

but got from cargo:

error: invalid character . in crate name: prefix.my_app

:-/

and this format is needed for internal reason to my company :-/

Got my answer in cargo documentation: The Manifest Format - The Cargo Book

will need to run a script in our build system to rename :slight_smile:

1 Like

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.