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
//! Configurable persistent storage layout, project identity, and migration for Synwire.
//!
//! ## Overview
//!
//! This crate provides three core abstractions:
//!
//! - **[`StorageLayout`]**: computes all Synwire storage paths for a given
//! product name, respecting the platform data/cache directory conventions
//! (XDG on Linux, `~/Library/…` on macOS, `%APPDATA%` on Windows).
//!
//! - **[`RepoId`] + [`WorktreeId`]**: stable two-level project identity.
//! `RepoId` is derived from the Git first-commit hash (shared across clones
//! and worktrees). `WorktreeId` further discriminates by worktree root path.
//!
//! - **[`StorageMigration`]**: per-subsystem schema version tracking and
//! incremental copy-then-swap migrations.
//!
//! - **[`ProjectRegistry`]**: global registry of indexed projects with
//! last-access timestamps and user tags.
//!
//! ## Quick start
//!
//! ```rust,no_run
//! use synwire_storage::{StorageLayout, WorktreeId};
//! use std::path::Path;
//!
//! let layout = StorageLayout::new("synwire").expect("storage layout");
//! let worktree = WorktreeId::for_path(Path::new(".")).expect("worktree id");
//!
//! let index_path = layout.index_cache(&worktree);
//! println!("Index cache: {}", index_path.display());
//! ```
pub use ;
pub use ;
pub use StorageError;
pub use ;
pub use ;
pub use ;
pub use ;