1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
//! On-disk database format.
//!
//! Very little behavior exists here, though this is a nice place to learn the
//! expected schema for what should exist in an Ark DB. It's tiny and simple, so
//! let's take a tour, eh?
//!
//! ```text
//! some/db/root <- (is usually a .dirtabase_db somewhere)
//! ├── cas
//! │ ├── 819d829... <- files named after their contents
//! │ ├── bbdef91... (it's a content-addressed store)
//! │ ├── de572b2...
//! │ └── ff0213c...
//! ├── labels
//! │ ├── @mutable
//! │ ├── @human
//! │ ├── @readable_names <- these just contain hashes to CAS items
//! │ └── @are_good
//! ├── cache
//! │ ├── 282eebd... <- used by Dirtabase to remember the outputs
//! │ ├── 304baad... of deterministic steps (and skip them next time)
//! │ └── 0380441...
//! └── tmp <- used briefly for certain operations, like imports
//! ```
//!
//! The reason so little of that behavior lives in this file, is... it lives
//! somewhere else! The DB object just needs to make a nice little empty home
//! for stuff to live. Putting stuff _into_ that home is the kind of job done by
//! Ark helper traits and the Dirtabase build system. Everybody's on the same
//! page, as far as what data should live where.
use Result;
use ;
/// Where persistent data lives.