forest icon indicating copy to clipboard operation
forest copied to clipboard

ban `std::env::var`, and have one `ForestVars` structure

Open aatifsyed opened this issue 1 year ago • 0 comments

  • We should have one struct where forest environment variables are described (for end users) and accessed (in code)
  • Remove documentation/src/environment_variables.md, and have it link to the rustdoc for the above

These means we have:

  • better control over environment variables
  • documentation that stays up-to-date

We could also have an approach like #3370 or using https://docs.rs/figment/latest/figment/index.html for config

Cargo did something similar last year: https://github.com/rust-lang/cargo/issues/11588

Originally posted by @aatifsyed in https://github.com/ChainSafe/forest/pull/4177#discussion_r1560771473

aatifsyed avatar Apr 11 '24 10:04 aatifsyed