aKode fase 5: rinomina interna (crate akode-*, akode-rs/, akode-cli/, binario akode, AKODE_*, ~/.akode, snapshot)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
andrea.difonzo
2026-11-11 11:06:46 +01:00
parent df99318392
commit 86e7c72e5f
10383 changed files with 749164 additions and 749170 deletions

View File

@@ -0,0 +1,22 @@
use anyhow::Result;
use akode_windows_sandbox_service::RunMode;
fn main() -> Result<()> {
akode_windows_sandbox_service::run(parse_mode(std::env::args().skip(1))?)
}
fn parse_mode(arguments: impl Iterator<Item = String>) -> Result<RunMode> {
let arguments = arguments.collect::<Vec<_>>();
match arguments.as_slice() {
[] => Ok(RunMode::Service),
[argument] if argument == "--service" => Ok(RunMode::Service),
#[cfg(debug_assertions)]
[argument] if argument == "--foreground" => Ok(RunMode::Foreground),
[argument] => anyhow::bail!("unrecognized service argument {argument:?}"),
_ => anyhow::bail!("expected at most one service argument"),
}
}
#[cfg(test)]
#[path = "main_tests.rs"]
mod tests;