Assume I want my executable to be named "index.cgi" (or any other name which is not a correct Rust crate name) and to be built with Cargo.
Is there any way in Cargo to specify a name of output executable, or rename an executable in a post-build step?
The documentation of Cargo is very scarce and I haven't found anything there. (A brief look at the sources didn't helped much too.)
The crate name and executable names must both be valid Rust identifiers.
You can set the name of an output executable (see 'Configuring a target' in the documentation for Cargo's manifest format), but it also has to be a valid identifier.
[[bin]]
name = "index.cgi"
path = "src/main.rs"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With