FIX: android NDK discovery fixes so rust crates will compile

This commit is contained in:
JohnE 2026-04-30 22:42:48 -07:00
parent ddf8c99af2
commit 72132da690
3 changed files with 15 additions and 3 deletions

View File

@ -179,6 +179,12 @@ class AndroidEnvironment {
'_CARGOKIT_NDK_LINK_TARGET': targetArg,
'_CARGOKIT_NDK_LINK_CLANG': ccValue,
'CARGOKIT_TOOL_TEMP_DIR': toolTempDir,
// Expose the NDK root so that build scripts (e.g. ccc-crypto-wolfssl/build.rs)
// can pass it to cmake as CMAKE_ANDROID_NDK. Without this, cmake's
// Android-Determine.cmake fails with "Neither the NDK or a standalone
// toolchain was found" because cmake is invoked in an isolated env that
// does not inherit ANDROID_NDK_ROOT from the shell.
'ANDROID_NDK_ROOT': ndkPath,
};
}

4
rust/Cargo.lock generated
View File

@ -181,7 +181,7 @@ dependencies = [
[[package]]
name = "ccc-crypto-core"
version = "0.1.0"
source = "git+ssh://git@10.0.5.109/j3g/lum_ccc_rust.git?branch=trunk#cbad181ae625cc7cd21afcbe40afdaf865d9b19a"
source = "git+ssh://git@10.0.5.109/j3g/lum_ccc_rust.git?branch=trunk#80e0e65462bebeca0f0fe2e75a236049c8c37293"
dependencies = [
"log",
"once_cell",
@ -194,7 +194,7 @@ dependencies = [
[[package]]
name = "ccc-crypto-wolfssl"
version = "0.1.0"
source = "git+ssh://git@10.0.5.109/j3g/lum_ccc_rust.git?branch=trunk#cbad181ae625cc7cd21afcbe40afdaf865d9b19a"
source = "git+ssh://git@10.0.5.109/j3g/lum_ccc_rust.git?branch=trunk#80e0e65462bebeca0f0fe2e75a236049c8c37293"
dependencies = [
"argon2",
"bindgen",

View File

@ -7,10 +7,16 @@ edition = "2021"
crate-type = ["cdylib", "staticlib"]
[dependencies]
# Production / CI: resolve from the private git server.
# After pushing changes to lum_ccc_rust run:
# cargo update -p ccc-crypto-core -p ccc-crypto-wolfssl (in this directory)
# then commit the updated Cargo.lock.
ccc-crypto-core = { git = "ssh://git@10.0.5.109/j3g/lum_ccc_rust.git", branch = "trunk" }
ccc-crypto-wolfssl = { git = "ssh://git@10.0.5.109/j3g/lum_ccc_rust.git", branch = "trunk" }
# For local development, you can uncomment the following lines and comment out the git dependencies above:
# Local development: set CCC_LOCAL_DEV=1 and use `cargo build` directly
# (not through Flutter) to iterate without git fetches or lock-file churn.
# Switch by running: dev-sync.sh --local / --git (see scripts/dev-sync.sh)
# ccc-crypto-core = { path = "/Volumes/LUM/source/letusmsg_proj/app/lum_ccc_rust/crates/ccc-crypto-core" }
# ccc-crypto-wolfssl = { path = "/Volumes/LUM/source/letusmsg_proj/app/lum_ccc_rust/crates/ccc-crypto-wolfssl" }