From a1433e0cefe3ad001d5473faf4312c25bdeea968 Mon Sep 17 00:00:00 2001 From: Michelle Tilley Date: Tue, 6 May 2025 08:36:32 -0700 Subject: feat: Implement KV as a write-through cache (#2732) --- crates/atuin-client/src/settings/kv.rs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 crates/atuin-client/src/settings/kv.rs (limited to 'crates/atuin-client/src/settings') diff --git a/crates/atuin-client/src/settings/kv.rs b/crates/atuin-client/src/settings/kv.rs new file mode 100644 index 00000000..afc24a35 --- /dev/null +++ b/crates/atuin-client/src/settings/kv.rs @@ -0,0 +1,17 @@ +use serde::{Deserialize, Serialize}; + +#[derive(Debug, Serialize, Deserialize, Clone)] +pub struct Settings { + pub db_path: String, +} + +impl Default for Settings { + fn default() -> Self { + let dir = atuin_common::utils::data_dir(); + let path = dir.join("kv.db"); + + Self { + db_path: path.to_string_lossy().to_string(), + } + } +} -- cgit v1.3.1