Skip to content

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
developfrom
feature/911-mingw-target-group
Open

michalharakal wants to merge 3 commits into
developfrom
feature/911-mingw-target-group

Conversation

@michalharakal

Copy link
Copy Markdown
Contributor

Implements the target side of #911 on top of the #900 convention plugin, advancing #804.

What

  • Plugin: new opt-in mingw target group (SkainetTargets KNOWN, deliberately not DEFAULT — no zero-config module silently grows a platform) mapping to mingwX64().
  • Migrated to sk.ainet.multiplatform with explicit skainet.targets incl. 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-models keeps its hand-rolled block (custom browser test config) and gains a plain mingwX64().
  • backend-cpu: mingwX64Main wired into the manual hierarchy + scalar platformDefaultCpuOpsFactory actual (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).
  • io-core: the posix-pread native64Main split is untouched; mingw deliberately stays out of it (LLP64, no pread). The Win32 RandomAccessSource + io-gguf land in the stacked follow-up PR.
  • io modules keep their pre-migration non-explicit-API mode (explicitApi = false); enabling it there is a separate cleanup.

Verified

  • compileKotlinMingwX64 repo-wide + scoped compileTestKotlinMingwX64 cross-compile from Linux.
  • Regression: jvmTest green on every migrated module; linuxX64Test green for io-core (native64 wiring) and backend-cpu.

Notes for review

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.
@github-actions

github-actions Bot commented Aug 9, 2026

Copy link
Copy Markdown

📖 Documentation Preview

The documentation has been built successfully for this PR.

Generated Files:

  • Operator documentation: docs/modules/operators/_generated_/
  • JSON schema output: operators.json

Artifacts:

  • Download the documentation-preview-915 artifact to view the complete documentation locally.

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)
@github-actions

Copy link
Copy Markdown

📖 Documentation Preview

The documentation has been built successfully for this PR.

Generated Files:

  • Operator documentation: docs/modules/operators/_generated_/
  • JSON schema output: operators.json

Artifacts:

  • Download the documentation-preview-915 artifact to view the complete documentation locally.

This comment will be updated automatically when the PR is updated.

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.

1 participant