From 8f63f36f12c6f6bc95811b0062f8703855e77d01 Mon Sep 17 00:00:00 2001 From: Michal Harakal Date: Mon, 20 Jul 2026 00:19:51 +0200 Subject: [PATCH] io-core: add androidNativeArm64 target MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit skainet-io-core already builds all other native targets (ios/macos/linux, all 64-bit) from a shared nativeMain whose RandomAccessSource actual is posix pread. androidNativeArm64 is also 64-bit, so it joins that source set cleanly; its only deps are lang-core (androidNative) + kotlinx (all androidNative-capable). Unblocks 64-bit on-device (arm64 phone) consumers that need the engine tokenizer (TokenizerFactory / SentencePiece / byte-level BPE decode) — e.g. the Moonshine ASR cartridge. Not androidNativeArm32: posix ssize_t/size_t are Int on 32-bit vs Long on the existing 64-bit targets, and mixing widths in the shared nativeMain metadata is illegal. Arm32 needs PosixPreadRandomAccessSource moved to a 64-bit-only source set (follow-up). skainet-io-safetensors also stays jvm/linux (additionally depends on compile-core/-dag, not androidNative). Co-Authored-By: Claude Opus 4.8 (1M context) --- skainet-io/skainet-io-core/build.gradle.kts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/skainet-io/skainet-io-core/build.gradle.kts b/skainet-io/skainet-io-core/build.gradle.kts index 1d479bba0..eefa3860e 100644 --- a/skainet-io/skainet-io-core/build.gradle.kts +++ b/skainet-io/skainet-io-core/build.gradle.kts @@ -39,6 +39,12 @@ kotlin { macosArm64 () linuxX64 () linuxArm64 () + // androidNativeArm64 joins the existing 64-bit native targets in the shared nativeMain + // (PosixPreadRandomAccessSource uses posix pread, whose ssize_t/size_t are Long on all of + // them). androidNativeArm32 is intentionally NOT added here: those posix types are Int on + // 32-bit, and mixing widths in the shared nativeMain metadata is illegal — arm32 needs the + // posix source moved to a 64-bit-only source set (tracked as a follow-up). + androidNativeArm64() js { browser()