build: opt-in mingw target group in sk.ainet.multiplatform; enable mingwX64 across lang/compile/backend/data/io (#911) - #915
Open
michalharakal wants to merge 3 commits into
Open
michalharakal wants to merge 3 commits into
michalharakal wants to merge 3 commits into
Conversation
posix pread(2) does not exist on mingw, and mingwX64 is LLP64 — so the Win32 path is a separate leaf implementation instead of joining io-core's native64Main posix source set: - io-core: WindowsRandomAccessSource (CreateFileW + ReadFile with an OVERLAPPED 64-bit offset — positional, thread-safe without locking, >2 GB-safe via Offset/OffsetHigh; GetFileSizeEx for size). Test is a port of PosixPreadRandomAccessSourceTest (kotlinx-io only). - io-gguf: migrated to sk.ainet.multiplatform with mingw enabled. The posix createRandomAccessSource actual moves from nativeMain into a new posixMain intermediate; the module opts out of the default hierarchy template (custom dependsOn edges silently disable it — the compilations collapsed to [leaf, commonMain] until wired by hand, same pattern as backend-cpu) and wires nativeMain/posixMain/leaf edges explicitly, with mingwX64Main off nativeMain carrying the Win32 actual. Fallback contract unchanged: null when the file cannot be opened -> legacy sequential reader. A windows-latest mingwX64Test CI lane follows in a separate workflow change (token pushing this branch lacks the workflow scope). Verified locally: linuxX64/macosArm64/mingwX64 compile green for io-gguf; mingw test klibs compile for io-core and io-gguf.
…mingwX64 across lang/compile/backend/data/io modules (#911, #804) Adds mingwX64 as an opt-in target group (KNOWN, not DEFAULT) to the convention plugin and migrates skainet-lang-{ksp-annotations,core,dag}, skainet-compile-{core,dag}, skainet-data-api, skainet-backend-api and skainet-io-{core,safetensors} to sk.ainet.multiplatform with explicit skainet.targets (advancing #804). skainet-lang-models keeps its hand-rolled block (custom browser test config) and gains a plain mingwX64() line. backend-cpu wires mingwX64Main into its manual hierarchy and adds the scalar PlatformCpuOpsFactory actual (same body as linux — pure Kotlin; SIMD is #910). io modules keep their pre-migration non-explicit-API mode; io-core's posix-pread native64Main split is untouched and mingw deliberately stays out of it (LLP64, no pread) — the Windows RandomAccessSource lands in the follow-up PR together with io-gguf. A mingw-cross CI leg (repo-wide compileKotlinMingwX64 + scoped test compilation) follows in a separate workflow change (token pushing this branch lacks the workflow scope). Verified locally: mingw main+test klibs cross-compile from Linux; jvmTest green across all migrated modules; linuxX64Test green for io-core (native64 wiring) and backend-cpu.
|
📖 Documentation Preview The documentation has been built successfully for this PR. Generated Files:
Artifacts:
This comment will be updated automatically when the PR is updated. |
…dows-io build(io): Windows random-access reads for io-core and io-gguf (#911)
|
📖 Documentation Preview The documentation has been built successfully for this PR. Generated Files:
Artifacts:
This comment will be updated automatically when the PR is updated. |
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.
Implements the target side of #911 on top of the #900 convention plugin, advancing #804.
What
mingwtarget group (SkainetTargetsKNOWN, deliberately not DEFAULT — no zero-config module silently grows a platform) mapping tomingwX64().sk.ainet.multiplatformwith explicitskainet.targetsincl.mingw:skainet-lang-{ksp-annotations,core,dag},skainet-compile-{core,dag},skainet-data-api,skainet-backend-api(its vestigial hand-wired source-set tree carried no files and is gone),skainet-io-{core,safetensors}.skainet-lang-modelskeeps its hand-rolled block (custom browser test config) and gains a plainmingwX64().mingwX64Mainwired into the manual hierarchy + scalarplatformDefaultCpuOpsFactoryactual (same pure-Kotlin body as linux; SIMD is Vectorized eager CPU kernels for Kotlin/Native targets (native RTF 2.7–5.8x JVM on identical workloads) #910).preadnative64Mainsplit is untouched; mingw deliberately stays out of it (LLP64, nopread). The Win32RandomAccessSource+ io-gguf land in the stacked follow-up PR.explicitApi = false); enabling it there is a separate cleanup.Verified
compileKotlinMingwX64repo-wide + scopedcompileTestKotlinMingwX64cross-compile from Linux.jvmTestgreen on every migrated module;linuxX64Testgreen for io-core (native64 wiring) and backend-cpu.Notes for review
mingw-crossCI matrix leg is prepared but ships separately (the token used to push lacks theworkflowscope). Task list: repo-widecompileKotlinMingwX64+ per-modulecompileTestKotlinMingwX64for the mingw-enabled modules — a repo-wide test compile would drag non-mingw modules (e.g.skainet-compile-json) into mingw test graphs via commonTest deps.