]> Cypherpunks.ru repositories - goredo.git/blobdiff - doc/state.texi
Prepare for release
[goredo.git] / doc / state.texi
index 5b0e05c221ac148a3d5f4381647b4f4c78b19eee..0a3b3d802fc1a83a3aff08b9b2f438e06c0a11bf 100644 (file)
@@ -5,9 +5,72 @@
 
 Dependency and build state is kept inside @file{.redo} subdirectory in
 each directory related the build. Each corresponding target has its own,
-recreated with every rebuild, @file{.rec} file. It is
-@url{https://www.gnu.org/software/recutils/, recfile}, that could have
-various dependency information. For example:
+recreated with every rebuild, binary @file{.dep} file.
+
+It starts with the header:
+
+@verbatim
+"GOREDO" || 0x01 || BuildUUID
+@end verbatim
+
+@code{0x01} is format's version number. @code{BuildUUID} is 128-bit UUID.
+
+After the header comes concatenation of length-prefixed chunks. Length
+is the length of the whole chunk, including the size of the encoded
+length itself. It is 16-bit big-endian integer. After the length comes
+single byte type of the chunk:
+
+@table @asis
+
+@item ifcreate
+
+@verbatim
+LEN || 0x01 || target
+@end verbatim
+
+@code{target} is UTF-8 encoded target's name.
+
+@item ifchange
+
+@verbatim
+LEN || 0x02 ||
+    size || inodeNum ||
+    ctimeSec || ctimeNsec ||
+    mtimeSec || mtimeNsec ||
+    hash || target
+@end verbatim
+
+@code{target} is UTF-8 encoded target's name.
+@code{hash} is 256-bit BLAKE3 hash.
+All other inode-related fields are 64-bit big-endian integers.
+
+@item always
+
+@verbatim
+LEN || 0x03
+@end verbatim
+
+@item stamp
+
+@verbatim
+LEN || 0x04 || hash
+@end verbatim
+
+@code{hash} is 256-bit BLAKE3 hash.
+
+@item ifchange-nonexistent
+
+@verbatim
+LEN || 0x05 || target
+@end verbatim
+
+@code{target} is UTF-8 encoded target's name.
+
+@end table
+
+That @file{.dep} file can be converted to human-readable
+@url{https://www.gnu.org/software/recutils/, recfile} format.
+For example:
 
 @example
 Build: 80143f04-bfff-4673-950c-081d712f573d
@@ -31,5 +94,5 @@ Type: stamp
 Hash: 5bbdf635932cb16b9127e69b6f3872577efed338f0a4ab6f2c7ca3df6ce50cc9
 @end example
 
-And the schema definition:
+And its schema definition:
 @verbatiminclude ../dep.rec