diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4339bc18..52b78771 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -60,7 +60,7 @@ jobs: run: cargo test -p techscript_cli - name: Verify 100% of official TechScript examples (20/20) - run: python verify_all_examples.py + run: python scripts/verify_all_examples.py - name: Verify Showcase App pure TechScript files shell: bash diff --git a/runtime/android_runtime/Cargo.toml b/runtime/android_runtime/Cargo.toml index 3db35c47..64487db7 100644 --- a/runtime/android_runtime/Cargo.toml +++ b/runtime/android_runtime/Cargo.toml @@ -18,7 +18,7 @@ crate-type = ["cdylib"] # ───────────────────────────────────────────────────────────────────────────── # Core dependencies # ───────────────────────────────────────────────────────────────────────────── -[dependencies] +[target.'cfg(target_os = "android")'.dependencies] # android-activity: provides android_main() entry point via NativeActivity # This is the Rust equivalent of ANativeActivity — no Java needed. android-activity = { version = "0.6", features = ["native-activity"] } diff --git a/runtime/android_runtime/build.rs b/runtime/android_runtime/build.rs index 626296aa..f4471c00 100644 --- a/runtime/android_runtime/build.rs +++ b/runtime/android_runtime/build.rs @@ -1,6 +1,8 @@ fn main() { - println!("cargo:rustc-link-lib=dylib=EGL"); - println!("cargo:rustc-link-lib=dylib=GLESv2"); - println!("cargo:rustc-link-lib=dylib=android"); - println!("cargo:rustc-link-lib=dylib=log"); + if std::env::var("CARGO_CFG_TARGET_OS").unwrap_or_default() == "android" { + println!("cargo:rustc-link-lib=dylib=EGL"); + println!("cargo:rustc-link-lib=dylib=GLESv2"); + println!("cargo:rustc-link-lib=dylib=android"); + println!("cargo:rustc-link-lib=dylib=log"); + } } diff --git a/runtime/android_runtime/src/lib.rs b/runtime/android_runtime/src/lib.rs index a9798c74..199dcf59 100644 --- a/runtime/android_runtime/src/lib.rs +++ b/runtime/android_runtime/src/lib.rs @@ -1,3 +1,4 @@ +#![cfg(target_os = "android")] // ============================================================================= // TechScript AppForge — Rust Native Android Runtime // runtime/android_runtime/src/lib.rs