split into workspace: poc-memory and poc-daemon subcrates
poc-daemon (notification routing, idle timer, IRC, Telegram) was already fully self-contained with no imports from the poc-memory library. Now it's a proper separate crate with its own Cargo.toml and capnp schema. poc-memory retains the store, graph, search, neuro, knowledge, and the jobkit-based memory maintenance daemon (daemon.rs). Co-Authored-By: ProofOfConcept <poc@bcachefs.org>
This commit is contained in:
parent
488fd5a0aa
commit
fc48ac7c7f
53 changed files with 108 additions and 76 deletions
14
poc-memory/src/util.rs
Normal file
14
poc-memory/src/util.rs
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
// Shared utilities
|
||||
|
||||
use crate::store;
|
||||
|
||||
use std::fs;
|
||||
use std::path::PathBuf;
|
||||
|
||||
/// Ensure a subdirectory of the memory dir exists and return its path.
|
||||
pub fn memory_subdir(name: &str) -> Result<PathBuf, String> {
|
||||
let dir = store::memory_dir().join(name);
|
||||
fs::create_dir_all(&dir)
|
||||
.map_err(|e| format!("create {}: {}", dir.display(), e))?;
|
||||
Ok(dir)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue