summaryrefslogtreecommitdiff
path: root/src/repo/constants.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/repo/constants.rs')
-rw-r--r--src/repo/constants.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/repo/constants.rs b/src/repo/constants.rs
new file mode 100644
index 0000000..e168a77
--- /dev/null
+++ b/src/repo/constants.rs
@@ -0,0 +1,11 @@
+use once_cell::sync::Lazy;
+use sled::{Config, Db};
+
+pub const PARTS_TREE: &str = "parts";
+pub const CARS_TREE: &str = "cars";
+pub static REPO_INSTANCE: Lazy<Db> = Lazy::new(|| {
+ Config::default()
+ .path("/tmp/twinh")
+ .open()
+ .expect("Couldn't open DB!")
+});