diff options
author | Robin Krahl <robin.krahl@ireas.org> | 2020-01-23 10:54:09 +0100 |
---|---|---|
committer | Daniel Mueller <deso@posteo.net> | 2020-09-01 21:12:43 -0700 |
commit | 3f430bac70a946c776a930fabc5b64a788113452 (patch) | |
tree | b1989fd259a159eb7982002155dc8b482948c1cd /Cargo.lock | |
parent | bb592ad9909c84c3c72252e1775b1cd2abc1e881 (diff) | |
download | nitrocli-3f430bac70a946c776a930fabc5b64a788113452.tar.gz nitrocli-3f430bac70a946c776a930fabc5b64a788113452.tar.bz2 |
Implement configuration handling
This patch implements basic configuration handling that reads a
configuration file and stores the parsed data in the ExecCtx and RunCtx
structs. It supports three configuration items:
- model (previously only --model)
- no_cache (previously only NITROCLI_NO_CACHE)
- verbosity (previously only --verbose)
Diffstat (limited to 'Cargo.lock')
-rw-r--r-- | Cargo.lock | 31 |
1 files changed, 31 insertions, 0 deletions
@@ -99,7 +99,9 @@ dependencies = [ "nitrokey-test", "nitrokey-test-state", "regex", + "serde", "structopt", + "toml", ] [[package]] @@ -212,6 +214,26 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7fe5bd57d1d7414c6b5ed48563a2c855d995ff777729dcd91c369ec7fea395ae" [[package]] +name = "serde" +version = "1.0.114" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5317f7588f0a5078ee60ef675ef96735a1442132dc645eb1d12c018620ed8cd3" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.114" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a0be94b04690fbaed37cddffc5c134bf537c8e3329d53e982fe04c374978f8e" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] name = "structopt" version = "0.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -276,6 +298,15 @@ dependencies = [ ] [[package]] +name = "toml" +version = "0.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffc92d160b1eef40665be3a05630d003936a3bc7da7421277846c2613e92c71a" +dependencies = [ + "serde", +] + +[[package]] name = "unicode-segmentation" version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" |