Skip to content

Use C ABI types for GLFW callbacks - #196

Merged
treeform merged 1 commit into
masterfrom
codex/nim-compatibility-2026-11-15
Nov 15, 2026
Merged

treeform merged 1 commit into
masterfrom
codex/nim-compatibility-2026-11-15

Conversation

@treeform

@treeform treeform commented Nov 15, 2026 •

Copy link
Copy Markdown
Owner

The native backend cannot register its resize and scroll callbacks when their Nim primitive parameter types differ from the C types declared by StaticGLFW. Use cint for framebuffer dimensions and cdouble for scroll offsets to match the callback signatures.

Validation:

  • Nim 2.4.0: nim check, native library and minimal example builds, and minimal JavaScript example build.
  • Nim 2.0.16: native library build.
  • The same callback changes were also verified during the compatibility audit on Nim 1.4.8, 1.6.20 and 2.2.12 (1.4.8 with compatible Pixie 5.1.0).

GUI examples were compiled without launching them.

CI: the Ubuntu rerun passes all 28 native and 28 JavaScript example builds after the StaticGLFW dependency fix in treeform/staticglfw#20 was merged. No additional Fidget source changes were needed.

@treeform
treeform merged commit 7deb4d7 into master Nov 15, 2026
1 of 2 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