ilo-config
Library for maintaining configs on disk in a simple, ergonomic way.
Quickstart
-
Create a new Cargo binary package.
&& -
Install the dependencies.
serdeandreqwestare only needed for the example code; they're not necessary for using the library in general. -
Paste the example code into
src/main.rs.use Config; use ; -
Run
export ILO_CONFIG_HOME=$(pwd)so that config files are created in the current directory instead of in the default directory (which is~/.config/ilo). -
Run the example with
cargo run. -
(Optional) Inspect the generated
example-config.jsonfile. Try changing the URL to, say,https://httpbin.org/headersand rerunning the program, or replacing the URL with a number and verifying that the type mismatch causes an error at runtime.
For more examples, see the examples/ directory.