palantir / witchcraft-rust-server

A highly opinionated Rust embedded application server for RESTy APIs
Apache License 2.0
5 stars 7 forks source link

improvement: allow custom config loaders #160

Closed afloren-palantir closed 10 months ago

afloren-palantir commented 10 months ago

Before this PR

Configs were always loaded from hard coded file paths

After this PR

Added a new optional entry point that allows providing custom config loading functions (not necessarily even loaded from files). ==COMMIT_MSG== allow custom config loaders ==COMMIT_MSG==

Possible downsides?

This can't be used with the provided main macro, should we add some sort of new macro or just assume anyone doing this type of configuration knows what they are doing and doesn't need it?

sfackler commented 10 months ago

Needs a rebase but LGTM

afloren-palantir commented 10 months ago

@sfackler should be good to go though it looks like I invalidated the approval by force-pushing the rebase 😬