From 2faa403884dfc606537adbb4bcafd2365de37c55 Mon Sep 17 00:00:00 2001 From: KhooLy <73142442+KhooLy@users.noreply.github.com> Date: Tue, 28 Jul 2026 02:30:22 +0300 Subject: [PATCH] fix(core): scope rquickjs bindgen feature to Android only Adding "bindgen" to rquickjs unconditionally also pulled it into desktop builds (features = ["desktop"] enables plugin-js-engine, which depends on rquickjs), reintroducing the libclang requirement that was deliberately dropped for exactly that reason. Move it to a target.'cfg(target_os = "android")' dependency override so only the Android cross-compile (which lacks prebuilt rquickjs-sys bindings for aarch64-linux-android) pulls it in; host builds are unaffected. Verified: `cargo build --features desktop` succeeds without bindgen, and the Android arm64-v8a cross-compile still enables it. --- Cargo.toml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index a11eedb..84fc754 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -96,7 +96,7 @@ p256 = { version = "0.14.0", optional = true } pbkdf2 = { version = "0.13.0", optional = true } rand = { version = "0.10.2", optional = true } regex = "1" -rquickjs = { version = "0.12.1", default-features = false, features = ["std", "chrono", "loader", "dyn-load", "either", "indexmap", "futures", "bindgen"], optional = true } +rquickjs = { version = "0.12.1", default-features = false, features = ["std", "chrono", "loader", "dyn-load", "either", "indexmap", "futures"], optional = true } rsa = { version = "0.9.10", features = ["sha2"], optional = true } scraper = { version = "0.27.0", optional = true } sha1 = { version = "0.11.0", optional = true } @@ -108,6 +108,9 @@ uniffi = { version = "0.31.1", optional = true } wasm-bindgen = { version = "0.2", optional = true } web-time = "1" +[target.'cfg(target_os = "android")'.dependencies] +rquickjs = { version = "0.12.1", default-features = false, features = ["std", "chrono", "loader", "dyn-load", "either", "indexmap", "futures", "bindgen"], optional = true } + [dev-dependencies] criterion = { version = "0.5", default-features = false }