Skip to main content

stable_which/
lib.rs

1//! Evaluate binary path stability and find stable PATH candidates.
2//!
3//! This library analyzes binary paths, tags them with stability attributes
4//! (version manager, build output, ephemeral, shim, etc.), and scores them
5//! to find the most stable candidate for use in service registration,
6//! configuration files, or scripts.
7//!
8//! # Quick Start
9//!
10//! ```no_run
11//! use stable_which::{find_candidates, ScoringPolicy};
12//! use std::path::Path;
13//!
14//! let candidates = find_candidates(Path::new("jj"), ScoringPolicy::SameBinary).unwrap();
15//! println!("Best: {}", candidates[0].path.display());
16//! ```
17
18pub mod candidate;
19pub mod path_analysis;
20
21// Re-export primary types and functions for convenience
22pub use candidate::{
23    Candidate, Error, PathTag, ScoringPolicy, find_candidates, find_candidates_with_env,
24    resolve_stable_path,
25};
26pub use path_analysis::VersionManagerInfo;