Files
containerarchive/rust/src/main.rs
Juergen Kunz ca510f4578 feat: add multi-item ingest and Reed-Solomon parity
- Multi-item ingest: each item gets its own Unix socket, Rust processes
  them sequentially into a single snapshot with separate chunk lists
- Reed-Solomon parity: rs(20,1) erasure coding for pack file groups,
  enabling single-pack-loss recovery via parity reconstruction
- Repair now attempts parity-based recovery for missing pack files
- 16 integration tests + 12 Rust unit tests all pass
2026-03-21 23:46:29 +00:00

53 lines
1.1 KiB
Rust

use clap::Parser;
mod config;
mod error;
mod management;
mod chunker;
mod hasher;
mod compression;
mod encryption;
mod pack_writer;
mod pack_reader;
mod global_index;
mod repository;
mod snapshot;
mod lock;
mod ingest;
mod restore;
mod verify;
mod prune;
mod parity;
mod repair;
#[derive(Parser, Debug)]
#[command(name = "containerarchive", about = "Content-addressed incremental backup engine")]
struct Cli {
/// Run in management mode (JSON IPC over stdin/stdout)
#[arg(long)]
management: bool,
}
#[tokio::main]
async fn main() -> anyhow::Result<()> {
// Initialize logging to stderr (stdout is reserved for IPC)
tracing_subscriber::fmt()
.with_writer(std::io::stderr)
.with_env_filter(
tracing_subscriber::EnvFilter::from_default_env()
.add_directive(tracing::Level::INFO.into()),
)
.init();
let cli = Cli::parse();
if cli.management {
management::management_loop().await?;
} else {
eprintln!("containerarchive: use --management for IPC mode");
std::process::exit(1);
}
Ok(())
}