Closed
Description
Problem
The CARGO_BIN_NAME environment variable is useful when building command-line programs (see #8251). It lets the command know its binary name for printing out simple usage instructions.
Currently CARGO_BIN_NAME is only set when building a [[bin]]
target, though. In my projects a lot of the examples are wrappers around functions of a library crate to allow testing with custom data, similar to small command-line programs. In those example binaries CARGO_BIN_NAME is not available during compilation.
Proposed Solution
It would be useful to also set the CARGO_BIN_NAME environment variable for (binary) examples.
Notes
No response