Skip to content

Fix macOS build with modern clang/Xcode - #132

Open
joaomcarlos wants to merge 1 commit into
rust-native-ui:trunkfrom
joaomcarlos:fix-macos-build
Open

joaomcarlos wants to merge 1 commit into
rust-native-ui:trunkfrom
joaomcarlos:fix-macos-build

Conversation

@joaomcarlos

@joaomcarlos joaomcarlos commented Sep 17, 2026

Copy link
Copy Markdown

Summary

  • bump ui-sys bindgen 0.54 -> 0.72: bindgen 0.54 panics on clang 16+ ("enum_(unnamed_at__/libui/ui_h_53_1)" is not a valid Ident)
  • add darwin/event.m to the ui-sys source list: main.m references uiprivSendKeyboardEditEvents (defined in event.m), causing an undefined-symbol link failure on arm64
  • fix usize/u64 casts in iui (brush.rs, strokeparams.rs, ui.rs): newer bindgen generates usize fields for NumStops/NumDashes/Size

Context

Found while trying to cargo install --git https://github.com/tudbut/qft --features gui on macOS 26 arm64 (Apple clang 21). The build failed inside ui-sys, then again at link time, then in iui — each fix surfaced the next error. With all three applied, qft compiles and qft gui launches correctly.

Test plan

  • cargo build on macOS 26 arm64 (Apple clang 21) succeeds
  • verified end-to-end by building tudbut/qft --features gui against this tree and launching qft gui

Note: related to #131

- bump ui-sys bindgen 0.54 -> 0.72: bindgen 0.54 panics on clang 16+
  ("enum_(unnamed_at...)" is not a valid Ident)
- add darwin/event.m to ui-sys source list: main.m references
  uiprivSendKeyboardEditEvents which lives in event.m, causing an
  arm64 link failure
- fix usize/u64 casts in iui: newer bindgen generates usize fields
  for NumStops/NumDashes/Size

Verified on macOS 26 arm64 (Apple clang 21) building qft --features gui
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