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:
45
akode-rs/windows-sandbox-service/src/lib.rs
Normal file
45
akode-rs/windows-sandbox-service/src/lib.rs
Normal file
@@ -0,0 +1,45 @@
|
||||
use anyhow::Result;
|
||||
|
||||
#[cfg(windows)]
|
||||
mod installation_record;
|
||||
#[cfg(windows)]
|
||||
mod ipc;
|
||||
|
||||
#[cfg(windows)]
|
||||
mod machine_policy;
|
||||
#[cfg(windows)]
|
||||
mod package_identity;
|
||||
#[cfg(windows)]
|
||||
mod package_lifecycle;
|
||||
#[cfg(windows)]
|
||||
mod provisioning;
|
||||
#[cfg(windows)]
|
||||
mod registered_runtime;
|
||||
#[cfg(windows)]
|
||||
mod service;
|
||||
#[cfg(any(windows, test))]
|
||||
mod uninstall_policy;
|
||||
|
||||
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
|
||||
pub enum RunMode {
|
||||
Service,
|
||||
#[cfg(debug_assertions)]
|
||||
Foreground,
|
||||
}
|
||||
|
||||
pub fn run(mode: RunMode) -> Result<()> {
|
||||
#[cfg(windows)]
|
||||
{
|
||||
match mode {
|
||||
RunMode::Service => service::run(),
|
||||
#[cfg(debug_assertions)]
|
||||
RunMode::Foreground => service::run_foreground(),
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(not(windows))]
|
||||
{
|
||||
let _ = mode;
|
||||
anyhow::bail!("the Codex sandbox service is only available on Windows")
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user