Skip to content

Adapt for Zig 0.17#26

Open
wrench1997 wants to merge 1 commit into
zig-gamedev:mainfrom
wrench1997:main
Open

Adapt for Zig 0.17#26
wrench1997 wants to merge 1 commit into
zig-gamedev:mainfrom
wrench1997:main

Conversation

@wrench1997

Copy link
Copy Markdown

This PR updates zphysics for Zig 0.17 compatibility:

Changes:

  • Update @typeinfo struct field iteration (field_names/field_types arrays)
  • Replace @cImport with addTranslateC in build.zig
  • Replace std.Thread.Mutex with std.Io.Mutex (removed in 0.17)
  • Update test initialization to use std.Io.Threaded
  • Add @aligncast where needed for pointer conversions
  • Change AllowedDOFs from enum to packed struct(u8) for C ABI compatibility
  • Fix struct layouts with explicit padding to match C ABI
  • Add helper methods for accessing u8-backed arrays as f32 arrays
  • Add size analysis and testing tools

Testing Environment:

  • OS: Windows 10 Pro
  • Zig: 0.17.0-dev.892+54537285c
  • Compiler: MSVC (JoltC)

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