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,39 @@
use std::env;
use std::path::PathBuf;
const SETUP_BIN: &str = "akode-windows-sandbox-setup";
const SETUP_MANIFEST: &str = "akode-windows-sandbox-setup.manifest";
fn main() -> Result<(), String> {
println!("cargo:rerun-if-changed={SETUP_MANIFEST}");
if env::var("CARGO_CFG_TARGET_OS").as_deref() != Ok("windows") {
return Ok(());
}
let manifest_dir = env::var_os("CARGO_MANIFEST_DIR")
.ok_or_else(|| "CARGO_MANIFEST_DIR should be set for build scripts".to_string())?;
let manifest_path = PathBuf::from(manifest_dir).join(SETUP_MANIFEST);
let manifest_path = manifest_path.display();
// Keep this scoped to the setup helper so Codex binaries that link the
// library do not inherit any resource metadata from this package.
match (
env::var("CARGO_CFG_TARGET_ENV").as_deref(),
env::var("CARGO_CFG_TARGET_ABI").as_deref(),
) {
(Ok("msvc"), _) => {
println!("cargo:rustc-link-arg-bin={SETUP_BIN}=/MANIFEST:EMBED");
println!("cargo:rustc-link-arg-bin={SETUP_BIN}=/MANIFESTINPUT:{manifest_path}");
}
(Ok("gnu"), Ok("llvm")) => {
println!("cargo:rustc-link-arg-bin={SETUP_BIN}=-Wl,-Xlink=/manifest:embed");
println!(
"cargo:rustc-link-arg-bin={SETUP_BIN}=-Wl,-Xlink=/manifestinput:{manifest_path}"
);
}
_ => {}
}
Ok(())
}