Skip to content

Commit

Permalink
Merge pull request #4514 from noritada/notes-on-cargo-env-vars
Browse files Browse the repository at this point in the history
docs: Present other environment variable alternatives to `crate_name!`
  • Loading branch information
epage committed Jan 3, 2023
2 parents 206d2e4 + e2501ef commit 7229047
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,12 @@ macro_rules! crate_description {

/// Allows you to pull the name from your Cargo.toml at compile time.
///
/// **NOTE:** This macro extracts the name from an environment variable `CARGO_PKG_NAME`.
/// When the crate name is set to something different from the package name,
/// use environment variables `CARGO_CRATE_NAME` or `CARGO_BIN_NAME`.
/// See [the Cargo Book](https://doc.rust-lang.org/cargo/reference/environment-variables.html)
/// for more information.
///
/// # Examples
///
/// ```no_run
Expand Down

0 comments on commit 7229047

Please sign in to comment.