Skip to content

Port Rayslides to Zig 0.17 with native platform fixes - #5

Merged
renerocksai merged 10 commits into
masterfrom
feat/zig-0.17-20261009
Oct 9, 2026
Merged

renerocksai merged 10 commits into
masterfrom
feat/zig-0.17-20261009

Conversation

@renerocksai

@renerocksai renerocksai commented Oct 9, 2026 •

Copy link
Copy Markdown
Collaborator

Rayslides' 0.16 build and C bindings fail with Zig 0.17. This ports the complete application and optional embedded editor to exact 0.17.0, preserves sentinel/reflection/scalar representation contracts, and adds native Debug/Safe CI on Linux, macOS, and Windows.

Native qualification also repairs existing platform defects:

  • macOS Retina window coordinates and framebuffer pixels remain coherent through resizing. Diagnostics retain an owned CPU framebuffer copy before swap through the existing post-edit readiness gate; Studio and the real Neovim overlay render normally. A review-discovered exclusive-fullscreen DPI mismatch is resolved by using and recording effective borderless mode for macOS exclusive requests; Linux and Windows retain exclusive mode.
  • Windows SDK libraries link directly without Strawberry's pkg-config batch wrapper; Python tooling selects the isolated interpreter; authored media paths stay portable while filesystem fixtures use native separators.
  • Save As obtains the read access required to stat its exclusive reservation and preserves externally replaced bytes after a detected SourceChangedOnDisk conflict. A deterministic real-filesystem regression verifies that preservation. The existing compare/rename gap does not provide arbitrary concurrent-file isolation.
  • Live Neovim probes queue edits and typed writes in one input stream and acknowledge typed error prompts, preserving literal source/revision and discard/lifecycle assertions. Both current Mac Neovim 0.12.5 and older Linux 0.9.5 are covered without changing production editor behavior.

The immutable dependency graph is the official raylib-zig 0.17 port plus a manifest-only relay to the owning C dependency's four Windows SDK link options. Runtime and binding code are unchanged by that relay. Upstream fixes: raylib #6242, wrapper #363.

Validation:

  • Native aarch64 macOS 26.6.2: updated graph and both editor configurations pass Debug/Safe (632 application tests, 1 stub test, 23 embedded-editor tests), live protocol/lifecycle probes, 26-deck syntax runtime, and Safe bundle build.
  • Actual Safe Mac binary and bundle pass 900×506 Studio/Neovim nonblank framebuffer, four-slide render-state, CLI, and exit checks.
  • Final source 37c7eabebb32074b89066bc0fb00e6f1a37d68b5: all six native Linux/macOS/Windows Debug/Safe jobs passed in run 37966734435, including the optional editor, live probes/syntax, Safe Linux framebuffer/no-display gates and Mac bundle.
  • Linux x86_64: kernel 6.17.0-1022-azure / glibc 2.39, Neovim 0.9.5; 633 default and 655 embedded-editor tests, all live probes and 26-deck syntax gates pass in both modes. Safe Xvfb verifies actual Studio/Neovim framebuffers using Mesa llvmpipe; the no-display gate exits with an ordinary error.
  • Hosted macOS 26.6.2 arm64 / Neovim 0.12.5: the same Debug/Safe application, editor and protocol/syntax gates pass; Safe app bundle builds.
  • Native Windows Server 2025 AMD64: 633/633 tests pass in Debug and Safe, with interpreter/Pillow harness and actual executable version/help smoke. Windows GUI rendering, physical camera/audio hardware, and multi-monitor handoff were not newly qualified.
  • The compact image is an obsolete UI reference: last refreshed August 25, before the September 11 Notes change under Zig 0.16. Its 5.32% changed-pixel delta (3% limit) records disagreement with that historical image rather than establishing a port regression. Current frame checks pass; historical images and thresholds are retained for a separately reviewed reference refresh.

docs/ZIG_0_17_MIGRATION.md records exact dependencies, platform scope, first failures, ownership checks, and retained visual-reference limits. No benchmark or production deployment was performed.

Independent Claude CLI and Astra xhigh reviews approve the exact final head. Claude first rejected the Retina exclusive path; the native reproduction shows the scissor patch at half scale. Both requested modes now pass a five-stage Safe native geometry/scissor and programmed-position readback diagnostic, with an independent nine-pixel PNG oracle, on the 2× LG HDR 4K display. The position readback checks neutral scale/offset; Cocoa OS pointer coordinates are established by pinned source analysis. Picker checks stay on the current monitor. Original rejected reviews, source-hash proof and owned-process cleanup are retained.

@renerocksai renerocksai changed the title Port Rayslides to Zig 0.17 and fix Retina capture Port Rayslides to Zig 0.17 with native platform fixes Oct 9, 2026
@renerocksai
renerocksai marked this pull request as ready for review October 9, 2026 16:12
@renerocksai
renerocksai merged commit 1856e69 into master Oct 9, 2026
6 checks passed
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