From 276e9a30cd229e8431ef44faf2c2665892f4601d Mon Sep 17 00:00:00 2001 From: Lukas Kalbertodt Date: Tue, 27 Jul 2021 18:01:49 +0200 Subject: [PATCH] Add comparisons to other libraries to README --- README.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/README.md b/README.md index 8b78b93..577fbc5 100644 --- a/README.md +++ b/README.md @@ -56,6 +56,32 @@ let config = Conf::builder() See [**the documentation**](https://docs.rs/confique) for more information. + +## Comparison with other libraries/solutions + +Obviously, all other libraries are more mature than confique. + +### [`config`](https://crates.io/crates/config) + +- Loosely typed: + - You access configuration values via string path (e.g. `http.port`) and deserialize at "use site". + - No defined schema +- More features +- Larger library +- If you need a "config template", you need to repeat yourself + +### [`figment`](https://crates.io/crates/figment) + +- Also based on `serde` and also uses your own structs as data store, thus type safe +- If you need a "config template", you need to repeat yourself + +### Just `serde`? + +Serde is not a configuration, but a deserialization library. +But you can get surprisingly far with just serde and it might actually be sufficient for your project. +However, once you want to load from multiple sources, you either have make all your fields `Option` or repeat yourself. + + ## Status of this project Confique is still a very young project.