thoughts_tool/platform/
constants.rs1#[cfg(target_os = "linux")]
3pub mod linux {
4 pub const DEFAULT_MOUNT_OPTIONS: &[&str] = &[
6 "category.create=mfs",
7 "moveonenospc=true",
8 "dropcacheonclose=true",
9 "fsname=thoughts",
10 ];
11
12 pub const PROC_MOUNTS: &str = "/proc/mounts";
14
15 pub const PROC_MOUNTINFO: &str = "/proc/self/mountinfo";
17
18 pub const MERGERFS_FSTYPE: &str = "fuse.mergerfs";
20}
21
22#[cfg(target_os = "macos")]
23pub mod macos {
24 pub const DEFAULT_VOLUME_NAME: &str = "Thoughts";
26
27 pub const DEFAULT_MOUNT_OPTIONS: &[&str] = &[
29 "volname=Thoughts",
30 "local",
31 "cow",
32 "hide_meta_files",
33 "use_ino",
34 "max_files=32768",
35 ];
36
37 pub const FUSE_T_FS_PATH: &str = "/Library/Filesystems/fuse-t.fs";
39
40 pub const UNIONFS_BINARIES: &[&str] = &["unionfs-fuse", "unionfs"];
42
43 pub const MOUNT_CMD: &str = "mount";
45
46 pub const DISKUTIL_CMD: &str = "diskutil";
48}
49
50pub mod common {
52 use std::time::Duration;
53
54 pub const MOUNT_POINT_PERMISSIONS: u32 = 0o755;
56
57 pub const MOUNT_TIMEOUT: Duration = Duration::from_secs(30);
59
60 pub const UNMOUNT_TIMEOUT: Duration = Duration::from_secs(10);
62
63 pub const MAX_MOUNT_RETRIES: u32 = 3;
65
66 pub const MOUNT_RETRY_DELAY: Duration = Duration::from_millis(500);
68
69 pub const MOUNT_VERIFY_TIMEOUT: Duration = Duration::from_secs(3);
71}