-
-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🎨 Refactor core config #214
Conversation
Update main with latest develop
This reverts commit b73699c.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had a few comments/nitpicks, but otherwise this looks great! Thank you so much for taking the time to work on this overhaul
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for making those changes - I think this is good to go! Thanks again 👍
As detailed in Issue #191, Stump currently relies on storing configuration variables in the environment to maintain global state in the application. This is undesirable because 1) it means functions' inputs are not the only thing that determines their behavior, 2) configuration is scattered throughout the repo, and 3) configuration doesn't benefit from Rust's robust validation ecosystem.
To address this, this pull request applies fairly comprehensive changes to the stump_core crate as well as the server app (to maintain compatibility with the changes to the core). All values that were configured with environment variables are still configured with the same environment variables, however, those values are now stored in a
StumpConfig
struct at startup and this struct is maintained in anArc
throughout Stump's runtime.Other than this, the application should behave exactly the same.