libarchive_oxide-cli 0.1.0

bsdtar-style CLI tools (oxtar/oxcpio/oxcat/oxunzip) over the libarchive_oxide library. Dogfooding + the observation surface for round-trip integration tests.
Documentation
// SPDX-FileCopyrightText: 2026 libarchive_oxide contributors
//
// SPDX-License-Identifier: MIT OR Apache-2.0

//! `oxcpio` — bsdcpio-compatible cpio tool. Thin `main` over
//! [`libarchive_oxide_cli::run_cpio`], mapping the [`CliError`] onto the exit-code contract
//! (0 success / 1 runtime / 2 usage). See the library docs for the full flag interface.
//!
//! [`CliError`]: libarchive_oxide_cli::CliError

use std::process::ExitCode;

fn main() -> ExitCode {
    let args: Vec<String> = std::env::args().skip(1).collect();
    match libarchive_oxide_cli::run_cpio(args) {
        Ok(()) => ExitCode::SUCCESS,
        Err(e) => {
            eprintln!("oxcpio: {e}");
            ExitCode::from(e.code)
        },
    }
}