configfs
A small lightweight filesystem config manager
configfs provides an api to load, deserialize and write
config files for your application.
This currently only supports the TOML format, however I shall introduce more formats in the future.
Installation
Add configfs and serde to your Cargo.toml
[]
= "0.1.2"
= { = "1", = ["derive"] }
Usage
Reading Config
use ;
use ;
Writing Config
use ;
use Serialize;
Features
system-dirs
Enables support to access the users local config directory, this is fetched using the dirs crate.
[]
= { = "0.1", = ["system-dirs"] }
An example that will save the config folder app in ~/.config/.
let config = new?;
watcher
Enables support to watch files as they reload.
An example of this to see file reloading can be seen in
examples/watcher.rs.
License
Licensed under either of:
- MIT License
- Apache License, Version 2.0