io-safetensors: add androidNative targets (drop unused compile-core/-dag)#845
Merged
Merged
Conversation
…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 #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>
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.
Completes androidNative for the SafeTensors weight-loading path (follow-on to #836/#842 for io-core).
What
Adds
androidNativeArm32()/androidNativeArm64()toskainet-io-safetensorsand removes itstwo unused
skainet-compile-core/skainet-compile-dagdependencies.Why it's clean
sk.ainet.compile.*reference anywhere in themodule (any source set). They were the only commonMain deps lacking androidNative.
createRandomAccessSourceandreadTextFilearenullstubs;
currentTimeMillisusesTimeSource.Monotonic. So there is no bit-width metadataconflict here — unlike
io-core, whose posixpreadneeded thenative64Mainsplit (io-core: add androidNativeArm32 via 64-bit-only native64Main source set #842).File-backed reads route through
io-core'sRandomAccessSource.After dropping the dead deps,
commonMaindepends only onlang-core+io-core(bothandroidNative) + kotlinx, so the targets just needed declaring.
Verification
compileNativeMainKotlinMetadata,compileKotlinAndroidNativeArm32,compileKotlinAndroidNativeArm64,compileKotlinJvm, and:skainet-io:skainet-io-safetensors:jvmTestall green.Unblocks on-device SafeTensors loading (the last io module that was jvm/linux-only) — e.g. an eager
on-device Moonshine ASR path on the 32-bit box / arm64 phones.