diff options
-rw-r--r-- | readme.md | 19 |
1 files changed, 17 insertions, 2 deletions
@@ -1,5 +1,8 @@ | |||
1 | # fondant | 1 | # fondant |
2 | 2 | ||
3 | [Architecture](#Architecture) · [Usage](#Usage) · | ||
4 | [Customization](#Customization) · [Todo](#Todo) | ||
5 | |||
3 | `fondant` is a macro based library to take the boilerplate out of | 6 | `fondant` is a macro based library to take the boilerplate out of |
4 | configuration handling. Most of `fondant` is based off the `confy` crate. | 7 | configuration handling. Most of `fondant` is based off the `confy` crate. |
5 | 8 | ||
@@ -9,7 +12,19 @@ configuration handling. Most of `fondant` is based off the `confy` crate. | |||
9 | - support for custom config paths | 12 | - support for custom config paths |
10 | - support for custom config file names | 13 | - support for custom config file names |
11 | 14 | ||
12 | ### Sample usage | 15 | ### Architecture |
16 | |||
17 | `fondant` is split into 3 separate crates: | ||
18 | |||
19 | - `fondant_deps`: external crates and utils that `fondant` requires | ||
20 | - `fondant_derive`: core macro definitions | ||
21 | - `fondant`: the user facing library that brings it all together | ||
22 | |||
23 | This slightly strange architecture arose because of some | ||
24 | limitations with proc-macro crates and strict cyclic | ||
25 | dependencies in cargo. All you need is the `fondant` crate. | ||
26 | |||
27 | ### Usage | ||
13 | 28 | ||
14 | ```rust | 29 | ```rust |
15 | // the struct has to derive Serialize, Deserialize and Default | 30 | // the struct has to derive Serialize, Deserialize and Default |
@@ -104,7 +119,7 @@ name = 'Central Park Zoo' | |||
104 | penguins = 4 | 119 | penguins = 4 |
105 | ``` | 120 | ``` |
106 | 121 | ||
107 | ### todo | 122 | ### Todo |
108 | 123 | ||
109 | - [ ] improve error from trait impl | 124 | - [ ] improve error from trait impl |
110 | - [ ] use `syn::Error` and `syn::Result` to report macro errors | 125 | - [ ] use `syn::Error` and `syn::Result` to report macro errors |