Skip to main content

Crate workspace

Crate workspace 

Source

Re-exports§

pub use presets::detect_preset_outputs;
pub use presets::resolve_artifact_paths;
pub use presets::Preset;
pub use presets::DEFAULT_PRESETS;
pub use lock::WorkspaceLockManager;
pub use state::compute_lockfiles_hash;
pub use state::read_state;
pub use state::write_state;
pub use state::WorkspaceState;
pub use history::format_rfc3339;
pub use history::get_recent_runs;
pub use history::save_run;
pub use history::MAX_RUNS_RETAINED;
pub use history::RUNS_DIR;
pub use cow::cow_clone_dir;
pub use cow::cow_clone_file;
pub use cow::find_seed_workspace;
pub use cow::parse_base_project_name;
pub use cas::CasStore;
pub use gc::calculate_dir_size;
pub use gc::gc_cas;
pub use gc::get_workspace_last_used;
pub use gc::run_emergency_disk_gc;
pub use gc::run_garbage_collection;
pub use gc::scan_workspaces;
pub use gc::touch_workspace;
pub use gc::trim_workspace_caches;
pub use gc::CasGcReport;
pub use gc::GcReport;
pub use gc::WorkspaceMetadata;
pub use disk::get_disk_space;
pub use disk::DiskSpace;
pub use change_token::change_token;

Modules§

cas
change_token
Per-file change tokens for the digest cache gate.
cow
disk
gc
history
lock
presets
state

Structs§

DiffResult

Functions§

apply_deletions
Safely remove files listed in to_delete from workspace_root and prune empty parent folders.
default_workspaces_dir
Returns the default workspaces root directory (~/.farhand/workspaces).
diff_manifests
Diff client manifest against the remote workspace files, obeying Section 5.1 deletion safety.
ensure_workspace_dir
Ensure a persistent workspace exists for project_name. If the directory does not exist, but an existing base/seed workspace exists (e.g. for repo:main when creating repo:feat), clones it via APFS CoW.
resolve_workspace_dir
Resolve a persistent workspace directory path based on a base root and project name. Example: ~/.farhand/workspaces/my-app-8a4b2e1f/
sum_artifact_bytes
Total on-disk size of the paths an artifact transfer would include.