io-core: add androidNativeArm32 via 64-bit-only native64Main source set - #842
Merged
Merged
Conversation
Completes androidNative for skainet-io-core (arm64 landed in #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>
MacOS
pushed a commit
to MacOS/SKaiNET
that referenced
this pull request
Jul 20, 2026
…dag deps skainet-io-safetensors was jvm/linux-only, blocking on-device (androidNative) SafeTensors weight loading. Two independent facts make it a clean add: 1. The commonMain deps on skainet-compile-core and skainet-compile-dag are unused (no sk.ainet.compile.* reference anywhere in the module) — they were the only deps lacking androidNative. Removed. 2. io-safetensors has no posix in its own nativeMain: createRandomAccessSource and readTextFile are null stubs and currentTimeMillis uses TimeSource.Monotonic, so there is no bit-width metadata issue (unlike io-core, whose posix pread needed the native64Main split in SKaiNET-developers#842). File-backed reads route through io-core's RandomAccessSource. After removing the dead deps, commonMain depends only on lang-core + io-core (both androidNative) + kotlinx, so androidNativeArm32/Arm64 just needed declaring. Verified: compileNativeMainKotlinMetadata, compileKotlinAndroidNativeArm32/Arm64, compileKotlinJvm, and jvmTest all green. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Merged
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #835 (arm32 half; arm64 landed in #836).
What
Completes androidNative for
skainet-io-coreby addingandroidNativeArm32().Why it needed more than a target declaration
androidNativeArm32is 32-bit, where posixssize_t/size_tareInt— butLongon everyother native target.
PosixPreadRandomAccessSource(posixpread) therefore can't sit in theshared
nativeMain: the shared native metadata compile (compileNativeMainKotlinMetadata) rejectsit with "numbers with different bit widths in at least two actual platforms". (The per-target
arm32 compile is fine; only the cross-width shared metadata is not.)
Fix
Introduce a 64-bit-only intermediate source set
native64Main(+native64Test) betweennativeMainand the six 64-bit native targets (ios/macos/linux + androidNativeArm64), and movePosixPreadRandomAccessSource(and its test) there.nativeMainno longer references thewidth-divergent posix API, so it compiles across all native targets including arm32; the posix code
compiles only for the width-uniform 64-bit group. Nothing in
commonMainreferencesPosixPreadRandomAccessSource(only its own test + external file-I/O consumers), so arm32 justbuilds without it.
Verification
compileNativeMainKotlinMetadata,compileKotlinAndroidNativeArm32,compileKotlinAndroidNativeArm64,compileKotlinLinuxX64, andcompileTestKotlinMacosArm64all compile clean.Unblocks 32-bit ARM Android devices (and any other androidNativeArm32 consumer) for the engine
tokenizer — the last piece for the on-device Moonshine ASR cartridge's text path.