From 4b97b494f52263ee9277c555bb40723e7cdd7729 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Sat, 24 Oct 2026 19:40:19 +0000 Subject: [PATCH] Fix CI build errors and update script path Co-authored-by: Tcode-Motion <188012755+Tcode-Motion@users.noreply.github.com> --- .github/workflows/ci.yml | 2 +- runtime/android_runtime/Cargo.toml | 2 +- runtime/android_runtime/build.rs | 10 ++++++---- runtime/android_runtime/src/lib.rs | 1 + 4 files changed, 9 insertions(+), 6 deletions(-) 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