Skip to content

io-core: add androidNativeArm64 target - #836

Merged
michalharakal merged 1 commit into
developfrom
feature/io-core-androidnative
Jul 20, 2026
Merged

michalharakal merged 1 commit into
developfrom
feature/io-core-androidnative

Conversation

@michalharakal

@michalharakal michalharakal commented Jul 19, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #835 (arm64 portion).

Adds androidNativeArm64() to skainet-io-core. It already builds all other native targets (ios/macos/linux, all 64-bit) from a shared nativeMain whose RandomAccessSource actual is posix pread; arm64 is 64-bit so it joins that source set cleanly. Deps are only lang-core (androidNative) + kotlinx (all androidNative-capable).

Unblocks 64-bit on-device (arm64 phone) consumers needing the engine tokenizer (Moonshine ASR cartridge).

Verification: :skainet-io:skainet-io-core:compileNativeMainKotlinMetadata and compileKotlinAndroidNativeArm64 compile clean.

Not androidNativeArm32 (deliberately)

posix ssize_t/size_t are Int on 32-bit vs Long on the existing 64-bit targets; mixing widths in the shared nativeMain metadata is illegal (compileNativeMainKotlinMetadata fails). Arm32 needs PosixPreadRandomAccessSource moved to a 64-bit-only source set — a small source-set refactor tracked as a follow-up. skainet-io-safetensors also stays jvm/linux (additionally depends on compile-core/-dag).

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) <noreply@anthropic.com>
@michalharakal
michalharakal force-pushed the feature/io-core-androidnative branch from 9b15988 to 8f63f36 Compare July 19, 2026 22:19
@michalharakal michalharakal changed the title io-core: add androidNativeArm32/Arm64 targets io-core: add androidNativeArm64 target Jul 19, 2026
@michalharakal
michalharakal merged commit c333e85 into develop Jul 20, 2026
7 checks passed
@michalharakal
michalharakal deleted the feature/io-core-androidnative branch July 20, 2026 08:29
MacOS pushed a commit to MacOS/SKaiNET that referenced this pull request Jul 20, 2026
Completes androidNative for skainet-io-core (arm64 landed in SKaiNET-developers#836). The 32-bit
target was blocked because PosixPreadRandomAccessSource uses posix pread, whose
ssize_t/size_t are Int on 32-bit but Long on every other native target — mixing
widths in the shared nativeMain metadata compile is illegal ('numbers with
different bit widths').

Introduces a 64-bit-only intermediate source set native64Main (+ native64Test)
between nativeMain and the six 64-bit native targets, and moves the posix source
there. nativeMain is now width-uniform-agnostic (no posix), so it compiles across
all native incl. androidNativeArm32; the posix code compiles only for the 64-bit
group. Nothing in commonMain references PosixPreadRandomAccessSource (only its own
test + external file-I/O consumers), so arm32 simply builds without it.

Verified: compileNativeMainKotlinMetadata, compileKotlinAndroidNativeArm32,
compileKotlinAndroidNativeArm64, compileKotlinLinuxX64, and
compileTestKotlinMacosArm64 all green.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@michalharakal michalharakal mentioned this pull request Jul 25, 2026
MacOS pushed a commit to MacOS/SKaiNET that referenced this pull request Jul 27, 2026
Bump version 0.36.0 -> 0.37.0 (gradle.properties, docs/antora.yml,
README quickstart). Promote CHANGELOG [Unreleased] to [0.37.0]: Lstm
layer (SKaiNET-developers#824), real Dropout masking (SKaiNET-developers#867), LR schedules and mutable
optimizer lr (SKaiNET-developers#866), optional-bias and open Linear (SKaiNET-developers#870, SKaiNET-developers#875),
androidNative IO targets (SKaiNET-developers#836, SKaiNET-developers#842, SKaiNET-developers#845), the SDPA default-scale fix
(SKaiNET-developers#880), three autograd fixes (SKaiNET-developers#877), the argMax DAG output spec (SKaiNET-developers#878),
tokenizer BPE inference and N-D gather (SKaiNET-developers#879), plus the CI/docs
supply-chain hardening and toolchain bumps. Refresh README "What's New"
and add a Contributors (0.37.0) section.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

io-core: add androidNativeArm32/Arm64 targets (posix nativeMain already covers them)

1 participant