home-config

Crates.io LICENSE

Use configuration file in the HOME directory

Usage

```rust use home_config::HomeConfig; use serde::{Deserialize, Serialize};

[derive(Serialize, Deserialize)]

struct Options { name: String, age: u32, }

let config = HomeConfig::new("yourname", "config.json"); // /Users/name/yourname/.config/config.json

// Parse let options = config.parse::().unwrap(); // options.name == "XiaoMing"; // options.age == 18;

// Save to file config.save(&options).unwrap(); ```