Skip to content

chore: bump Zig to 0.17.0, update sokol/NFD/Nuklear, v1.0.2 - #24

Merged
bubio merged 3 commits into
mainfrom
chore/bump-zig-0.17
Oct 22, 2026
Merged

bubio merged 3 commits into
mainfrom
chore/bump-zig-0.17

Conversation

@bubio

@bubio bubio commented Oct 22, 2026

Copy link
Copy Markdown
Owner

概要

Zig を 0.17.0(最新安定版)に上げ、依存ライブラリも最新に更新しました。あわせて zig fmt を適用し、バージョンを 1.0.2 に上げています。

依存の更新

対象 変更
Zig 0.16.0 → 0.17.0(.mise.toml、CI ワークフロー 3 本、minimum_zig_version、README)
sokol-zig master 3990b66
nativefiledialog-extended v1.4.1
third_party/sokol/sokol_nuklear.h 上流 sokol master に同期
third_party/nuklear/nuklear.h 上流 Nuklear master に同期

third_party の 2 ファイルは、どちらも上流の無改変コピーだったことを確認してから差し替えています。

Zig 0.17 / sokol の破壊的変更への対応

  • @cImport の廃止: build.zig の addTranslateC に移しました。読み込むヘッダーは src/cimport/*_c.h に置き、Zig 側からは np2_c / nfd_c / nk_c / stdio_c として import します。テストも同じモジュールを使います。
  • ** 演算子の廃止: @splat に置き換えました。
  • std の API 変更: dupeZ → dupeSentinel(.., 0)、std.fmt.bufPrintZ → std.mem.printSentinel(.., 0)
  • build.zig の API 変更: .Windows → .windows、b.args → addPassthruArgs()
  • macOS の bundle ステップ: getInstallPath が使えなくなったため、mkdir/cp をやめて addInstallArtifact / addInstallFile で書き直しました。Finder の表示更新用だった touch は外しています。
  • sokol_gfx の API 変更: 画面転送を stream_update + updateImage から write_transient + writeImageTransient に移しました。画面は毎フレーム転送し、そのフレーム内で描画しているので、新しい方式がそのまま当てはまります。

コミット構成

  1. Zig 0.17 対応と依存の更新
  2. zig fmt の適用(空白と改行だけの変更)
  3. バージョンを 1.0.2 に更新(CFBundleVersion は 3)

確認したこと

  • Linux:zig build と zig build test が通ること、デバッグビルドで起動して描画されること
  • Windows:クロスビルド(-Dtarget=x86_64-windows)が通ること
  • zig fmt --check build.zig src が通ること
  • macOS:コンパイル、リンク、zig build bundle の動作(ローカルに SDK がないので CI で確認してください)

🤖 Generated with Claude Code

bubio and others added 3 commits October 22, 2026 10:34
- Zig 0.16.0 -> 0.17.0 (mise, CI workflows, minimum_zig_version, README)
- sokol-zig -> master 3990b66, nativefiledialog-extended -> v1.4.1
- third_party: sokol_nuklear.h and nuklear.h synced to upstream master
- Replace removed @cImport with build-time translate-c modules
  (src/cimport/*_c.h -> np2_c / nfd_c / nk_c / stdio_c)
- Replace removed `**` array repetition with @Splat
- dupeZ -> dupeSentinel(.., 0), fmt.bufPrintZ -> mem.printSentinel(.., 0)
- sokol_gfx: stream_update/updateImage -> write_transient/writeImageTransient
- build.zig: .Windows -> .windows, b.args -> addPassthruArgs(),
  macOS bundle step rewritten with install steps (getInstallPath removed)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@bubio
bubio merged commit 7b0701c into main Oct 22, 2026
3 checks passed
@bubio
bubio deleted the chore/bump-zig-0.17 branch October 22, 2026 06:26
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