Skip to content

Expose cross-platform descriptor byte-view I/O - #15

Closed
coenttb wants to merge 2 commits into
mainfrom
kernel-descriptor-span-io
Closed

coenttb wants to merge 2 commits into
mainfrom
kernel-descriptor-span-io

Conversation

@coenttb

@coenttb coenttb commented Aug 11, 2026

Copy link
Copy Markdown
Collaborator

Summary

Freeze the platform producers whose existing typealias/product composition exposes canonical synchronous descriptor byte-view operations through Kernel:

  • POSIX policy 006ba5e9a813c04896a40b8e0ed4435807acfd05, pinning ISO 9945 a877b6d48cd461c50b909821c0b2b1d0898176b2.
  • Win32 producer 2b2e6e1055961c6922538dbb7eb74531eb72878c, re-exported through the existing swift-windows chain.

This exposes:

  • Kernel.IO.Read.read(_:into: inout Swift.OutputSpan<Byte>) throws(Kernel.IO.Read.Error) -> Int
  • Kernel.IO.Write.write(_:from: borrowing Swift.Span<Byte>) throws(Kernel.IO.Write.Error) -> Int

No duplicate unifier forwarding overload is added because Kernel.IO is already a platform typealias; redeclaring the same signature would create competing ownership. POSIX retains EINTR retry and unchanged would-block propagation. Win32 retains native ReadFile/WriteFile EOF, partial-completion, and typed-error semantics. OutputSpan frontier management remains in the deepest platform producer.

Issue: #14
Goal: swift-institute/.github#87

Static controls

  • Public repository, guarded main 1cbcc9b9fdbe977d2c219ffcaca7a872751fefc5.
  • Head f12f7def2eb02bd910d7e5e8d72160216f92b078 changes only Package.swift.
  • Existing swift-windows Windows.Kernel.IO = Windows.32.Kernel.IO alias and Windows Kernel re-export were inspected at 41e619315c812bf3c24e358fe675ba7d2e9718a8; no wrapper is required.
  • Commit/diff scanned for machine paths, private internals, credentials, and control-plane secrets; none present.
  • Worktree clean after the commit.

Verification status

Explicitly UNVERIFIED. Under the source-only moratorium, no build, test, resolve, update, clean, run, compose, verify, typecheck, lint, compiler probe, CI read, or Package.resolved operation was performed.

@coenttb

coenttb commented Aug 14, 2026

Copy link
Copy Markdown
Collaborator Author

Semantic owner link (swift-institute/.github#591): this open PR implements swift-foundations/swift-kernel#14. Exact PR head at adjudication: f12f7de.

@coenttb coenttb closed this Sep 3, 2026
@coenttb
coenttb deleted the kernel-descriptor-span-io branch September 3, 2026 14:23
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