programming/rust.org
... ...
@@ -10,13 +10,26 @@
10 10
11 11
It only allows you to write a placeholder for some types that are unrepresentable, like closures and iterators.
12 12
13
+** On creating config files
14
+:PROPERTIES:
15
+:CREATED: [2024-05-09 Thu 22:57]
16
+:END:
17
+
18
+*** *always* have a =version= field
19
+:PROPERTIES:
20
+:CREATED: [2024-05-09 Thu 23:02]
21
+:END:
22
+
23
+- that *never* changes place.
24
+- exists from the beginning of the versions of the config file.
25
+- preferably at the top level of the file.
26
+
27
+This way we can easily check if a config file is compatible with our parser.
28
+
29
+It is also interesting to separate the config structure+parser in a crate, so we can use it's version exclusively for this.
30
+
13 31
* Embedded Rust
14 32
** General Reminders
15 33
16 34
Implementing traits for all peripheral 'kinds' (as in peripherals that have the same function but different hardware implementations) eases migrating in the future from one implementation to the next and also allows you to implement virtual peripherals for testing without the real hardware.
17 35
18
-* On creating config files
19
-:PROPERTIES:
20
-:CREATED: [2024-05-09 Thu 22:57]
21
-:END:
22
-