From 9d3c50ca3f9ff0bf12b1b25344959ed333ffbdee Mon Sep 17 00:00:00 2001 From: Robin Krahl Date: Thu, 23 Jan 2020 10:54:09 +0100 Subject: 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) --- Cargo.lock | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'Cargo.lock') diff --git a/Cargo.lock b/Cargo.lock index 81f4c8e..6893b95 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -99,7 +99,9 @@ dependencies = [ "nitrokey-test", "nitrokey-test-state", "regex", + "serde", "structopt", + "toml", ] [[package]] @@ -211,6 +213,26 @@ version = "0.6.17" 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" @@ -275,6 +297,15 @@ dependencies = [ "lazy_static", ] +[[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" -- cgit v1.2.3