refactor: split the TUI and refresh project docs
Move login state, authentication, discovery, input, rendering, and tests into focused TUI modules. Add detailed CLI error reports with recovery commands, align the build and host-check documentation, and keep the legacy Go tree outside normal builds. Checks: make check; make integration-test; go test ./... (legacy/go).
This commit is contained in:
18
rust/main.rs
18
rust/main.rs
@@ -1,4 +1,4 @@
|
||||
//! latchd is a root-owned terminal login manager.
|
||||
//! Terminal login manager entry point and service loop.
|
||||
|
||||
#![deny(unsafe_op_in_unsafe_fn)]
|
||||
#![warn(missing_docs)]
|
||||
@@ -25,7 +25,7 @@ const BUILD_VERSION: &str = env!("LATCHD_VERSION");
|
||||
const BUILD_COMMIT: &str = env!("LATCHD_COMMIT");
|
||||
const BUILD_TIME: &str = env!("LATCHD_BUILD_TIME");
|
||||
|
||||
/// Command-line options for latchd.
|
||||
/// Command-line options for the login service.
|
||||
#[derive(Debug, Parser)]
|
||||
#[command(
|
||||
name = "latchd",
|
||||
@@ -36,7 +36,7 @@ struct Cli {
|
||||
/// Configuration TOML path.
|
||||
#[arg(short, long)]
|
||||
config: Option<PathBuf>,
|
||||
/// Optional variable TOML path.
|
||||
/// TOML file with values for text substitution.
|
||||
#[arg(short = 'v', long)]
|
||||
variables: Option<PathBuf>,
|
||||
/// Override the configured virtual terminal.
|
||||
@@ -51,26 +51,26 @@ struct Cli {
|
||||
/// Override the session PATH.
|
||||
#[arg(long)]
|
||||
initial_path: Option<String>,
|
||||
/// Run without authenticating or starting a real session.
|
||||
/// Run the screen without authentication or session startup.
|
||||
#[arg(long)]
|
||||
preview: bool,
|
||||
/// Validate configuration and exit without starting the TUI.
|
||||
/// Validate the configuration and sessions without opening the screen.
|
||||
#[arg(long, alias = "preflight")]
|
||||
no_tui: bool,
|
||||
/// Do not create a main log.
|
||||
/// Skip the main log file.
|
||||
#[arg(long)]
|
||||
no_log: bool,
|
||||
/// Print the validated configuration and exit.
|
||||
/// Print build information and selected configuration values.
|
||||
#[arg(long)]
|
||||
show_config: bool,
|
||||
/// Print embedded release metadata without accessing configuration or PAM.
|
||||
/// Print embedded build metadata.
|
||||
#[arg(long)]
|
||||
build_info: bool,
|
||||
}
|
||||
|
||||
fn main() -> color_eyre::Result<()> {
|
||||
color_eyre::install()?;
|
||||
run().map_err(|error| color_eyre::eyre::eyre!(error.to_string()))
|
||||
run().map_err(|error| color_eyre::eyre::eyre!(error.user_report()))
|
||||
}
|
||||
|
||||
fn run() -> Result<(), Error> {
|
||||
|
||||
Reference in New Issue
Block a user