[PR #439] [MERGED] Upgrade to Zig 0.15.2 #538

Closed
opened 2026-03-02 23:46:58 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/anomalyco/opentui/pull/439
Author: @remorses
Created: 12/23/2025
Status: Merged
Merged: 1/6/2026
Merged by: @kommander

Base: mainHead: zig15


📝 Commits (10+)

  • e8fc818 upgrade to zig 0.15.2 with ghostty-vt dependency
  • fda777b fix(ci): update zig to 0.15.2 and skip macOS cross-compilation from Linux
  • 0828eb1 fix: add macOS SDK for cross-compilation from Linux
  • fc7907e fix: add explicit refs to git URLs in build.zig.zon
  • c24c7b0 fix: correct hash for macos_sdk dependency
  • f6976e8 fix: use raw macOS SDK tarball instead of outdated zig package
  • d4d4b44 fix(ci): only build lib, not native binaries for all platforms
  • 486901b fix(ci): use macos-latest runners for cross-compilation
  • b3d1e91 fix: build only native platform by default, add --all for all platforms
  • 6654359 fix: remove reference to non-existent ghostty-terminal.zig test file

📊 Changes

46 files changed (+2221 additions, -3057 deletions)

View changed files

📝 .github/workflows/build-core.yml (+2 -2)
📝 .github/workflows/build-native.yml (+5 -2)
📝 .github/workflows/build-react.yml (+1 -1)
📝 .github/workflows/build-solid.yml (+1 -1)
📝 .github/workflows/npm-release.yml (+8 -3)
📝 .zig-version (+1 -1)
📝 packages/core/scripts/build.ts (+15 -19)
📝 packages/core/src/renderables/Code.test.ts (+12 -2)
📝 packages/core/src/tests/wrap-resize-perf.test.ts (+7 -6)
📝 packages/core/src/zig/ansi.zig (+10 -7)
📝 packages/core/src/zig/bench-utils.zig (+122 -18)
📝 packages/core/src/zig/bench.zig (+14 -7)
📝 packages/core/src/zig/bench/buffer-draw-text-buffer_bench.zig (+211 -373)
📝 packages/core/src/zig/bench/edit-buffer_bench.zig (+128 -219)
📝 packages/core/src/zig/bench/rope-markers_bench.zig (+222 -387)
📝 packages/core/src/zig/bench/rope_bench.zig (+165 -299)
📝 packages/core/src/zig/bench/styled-text_bench.zig (+103 -172)
📝 packages/core/src/zig/bench/text-buffer-coords_bench.zig (+112 -183)
📝 packages/core/src/zig/bench/text-buffer-view_bench.zig (+83 -158)
📝 packages/core/src/zig/bench/text-chunk-graphemes_bench.zig (+22 -43)

...and 26 more files

📄 Description

Changes

  • Upgrade from Zig 0.14.x to 0.15.2
  • Add ghostty-vt as a dependency for terminal emulation
  • Update build.zig for Zig 0.15 API (createModule, standardOptimizeOption, etc.)
  • Use -gnu suffix for Linux targets to fix PIC linker errors when cross-compiling
  • Update CI workflows (build-core.yml, build-native.yml) to use Zig 0.15.2
  • Update all zig source files for 0.15 compatibility:
    • callconv(.C)callconv(.c)
    • std.ArrayListstd.ArrayListUnmanaged with explicit allocator
    • Writer/BufferedWriter API changes

Testing

Cross-compiled Linux binaries (both x64 and arm64) were tested inside an OrbStack Linux VM. The full rendering pipeline works correctly - created a test that renders a multi-panel layout with boxes, text, and different border styles (rounded, single, double). The TUI output renders properly and the renderer starts/stops cleanly with exit code 0.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/anomalyco/opentui/pull/439 **Author:** [@remorses](https://github.com/remorses) **Created:** 12/23/2025 **Status:** ✅ Merged **Merged:** 1/6/2026 **Merged by:** [@kommander](https://github.com/kommander) **Base:** `main` ← **Head:** `zig15` --- ### 📝 Commits (10+) - [`e8fc818`](https://github.com/anomalyco/opentui/commit/e8fc818fe429b20b81d040bf2e88a827a5f50b78) upgrade to zig 0.15.2 with ghostty-vt dependency - [`fda777b`](https://github.com/anomalyco/opentui/commit/fda777b7d6ac8ad012f23273a7847a42fbe0eb1f) fix(ci): update zig to 0.15.2 and skip macOS cross-compilation from Linux - [`0828eb1`](https://github.com/anomalyco/opentui/commit/0828eb120b55bcb95ba84b69f0b3025a00ef4db7) fix: add macOS SDK for cross-compilation from Linux - [`fc7907e`](https://github.com/anomalyco/opentui/commit/fc7907ef04806e8b9bda45c629347934151b85bc) fix: add explicit refs to git URLs in build.zig.zon - [`c24c7b0`](https://github.com/anomalyco/opentui/commit/c24c7b014f2993566a35f6659a6f3fdc5751c0bb) fix: correct hash for macos_sdk dependency - [`f6976e8`](https://github.com/anomalyco/opentui/commit/f6976e80f572b51c2c00beae2a82af7477268229) fix: use raw macOS SDK tarball instead of outdated zig package - [`d4d4b44`](https://github.com/anomalyco/opentui/commit/d4d4b4414e5de52e25010ebaceb2c83623ad5930) fix(ci): only build lib, not native binaries for all platforms - [`486901b`](https://github.com/anomalyco/opentui/commit/486901b645c4dbde9d72208635bc85e4e07aab9d) fix(ci): use macos-latest runners for cross-compilation - [`b3d1e91`](https://github.com/anomalyco/opentui/commit/b3d1e913b2b170ed88f19dfa34d6c7410add0a7b) fix: build only native platform by default, add --all for all platforms - [`6654359`](https://github.com/anomalyco/opentui/commit/6654359553d0ee2bca1f0b7d3ee1d3f4dfd44afe) fix: remove reference to non-existent ghostty-terminal.zig test file ### 📊 Changes **46 files changed** (+2221 additions, -3057 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/build-core.yml` (+2 -2) 📝 `.github/workflows/build-native.yml` (+5 -2) 📝 `.github/workflows/build-react.yml` (+1 -1) 📝 `.github/workflows/build-solid.yml` (+1 -1) 📝 `.github/workflows/npm-release.yml` (+8 -3) 📝 `.zig-version` (+1 -1) 📝 `packages/core/scripts/build.ts` (+15 -19) 📝 `packages/core/src/renderables/Code.test.ts` (+12 -2) 📝 `packages/core/src/tests/wrap-resize-perf.test.ts` (+7 -6) 📝 `packages/core/src/zig/ansi.zig` (+10 -7) 📝 `packages/core/src/zig/bench-utils.zig` (+122 -18) 📝 `packages/core/src/zig/bench.zig` (+14 -7) 📝 `packages/core/src/zig/bench/buffer-draw-text-buffer_bench.zig` (+211 -373) 📝 `packages/core/src/zig/bench/edit-buffer_bench.zig` (+128 -219) 📝 `packages/core/src/zig/bench/rope-markers_bench.zig` (+222 -387) 📝 `packages/core/src/zig/bench/rope_bench.zig` (+165 -299) 📝 `packages/core/src/zig/bench/styled-text_bench.zig` (+103 -172) 📝 `packages/core/src/zig/bench/text-buffer-coords_bench.zig` (+112 -183) 📝 `packages/core/src/zig/bench/text-buffer-view_bench.zig` (+83 -158) 📝 `packages/core/src/zig/bench/text-chunk-graphemes_bench.zig` (+22 -43) _...and 26 more files_ </details> ### 📄 Description ## Changes - Upgrade from Zig 0.14.x to 0.15.2 - Add ghostty-vt as a dependency for terminal emulation - Update build.zig for Zig 0.15 API (`createModule`, `standardOptimizeOption`, etc.) - Use `-gnu` suffix for Linux targets to fix PIC linker errors when cross-compiling - Update CI workflows (build-core.yml, build-native.yml) to use Zig 0.15.2 - Update all zig source files for 0.15 compatibility: - `callconv(.C)` → `callconv(.c)` - `std.ArrayList` → `std.ArrayListUnmanaged` with explicit allocator - Writer/BufferedWriter API changes ## Testing Cross-compiled Linux binaries (both x64 and arm64) were tested inside an OrbStack Linux VM. The full rendering pipeline works correctly - created a test that renders a multi-panel layout with boxes, text, and different border styles (rounded, single, double). The TUI output renders properly and the renderer starts/stops cleanly with exit code 0. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-02 23:46:58 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/opentui#538
No description provided.