Skip to content

chore: bump kextract (b27b562) and regenerate WebGPU bindings - #133

Merged
ygdrasil-io merged 1 commit into
mainfrom
chore/bump-kextract-64-regenerate-bindings
Oct 4, 2026
Merged

ygdrasil-io merged 1 commit into
mainfrom
chore/bump-kextract-64-regenerate-bindings

Conversation

@ygdrasil-io

Copy link
Copy Markdown
Contributor

Purpose

Bump the kextract submodule from 07d57be to master b27b562 — which now includes klang-toolkit/kextract#63 (large 64-bit headers) and klang-toolkit/kextract#64 (Android callGeneric fallback for shapes outside the kffi Android baseline) — and regenerate the versioned multiplatform WebGPU bindings.

Changes

  • kextract submodule: 07d57be → b27b562 (master).
  • Regenerated wgpu_hJvm.kt, wgpu_hNative.kt, wgpu_hAndroid.kt; wgpu_hCommon.kt is unchanged.
    • wgpu_hJvm.kt: struct-layout registration split into per-struct helper functions (__kffiJvmStructFieldsN_0() / __kffiJvmRegisterStructLayoutN()) to stay under the JVM 64 KiB method limit (kextract Bump com.charleskorn.kaml:kaml from 0.76.0 to 0.77.0 #63), plus whitespace.
    • wgpu_hNative.kt: whitespace only.
    • wgpu_hAndroid.kt: the 44 generic-path downcalls now scope their argument allocator in try { … } finally { argsAllocator.close() }, void returns no longer allocate an unused output buffer (0L passed instead), and unsigned scalar generic returns are read through converted carriers (.toUInt(), .toULong(), …) — kextract wgpuInstanceRequestAdapter crash on MacOS X64 #64. Fixed-shape wrapper selection is unchanged: every shape used by webgpu.h is inside the kffi Android engine baseline.

No build-script change: the existing sanitized-header generator input already provides a fixed 64-bit size_t, so --allow-64-bit-scalars is not required.

Validation

  • ./gradlew :wgpu4k-native:generateBindingsFromHeader → BUILD SUCCESSFUL
  • ./gradlew :wgpu4k-native:compileKotlinJvm :wgpu4k-native:compileDebugKotlinAndroid --rerun-tasks → BUILD SUCCESSFUL (fresh compile, no cache)
  • ./gradlew :wgpu4k-native:verifyGeneratedBindingsClean → BUILD SUCCESSFUL
  • ./gradlew :wgpu4k-native:verifyJvmBootstrapBinding → BUILD SUCCESSFUL
  • ./gradlew :wgpu4k-native:verifyBindingGenerationConfiguration → BUILD SUCCESSFUL
  • CI

Notes

  • The whitespace churn (empty lines regenerated as indented) comes from kextract Bump com.charleskorn.kaml:kaml from 0.76.0 to 0.77.0 #63's emission; the build has no formatter/lint gate, and verifyGeneratedBindingsClean requires committed files to match the generator output exactly.
  • Android impact measured before opening: exactly the 44 callGeneric functions change (allocator lifetime, void out-buffer removal); no fixed-shape call changes; the allowlist addition and unsigned-return conversion have no additional effect on webgpu.h beyond those 44 functions.

Advance the kextract submodule from 07d57be to master b27b562, which
includes klang-toolkit/kextract#63 (large 64-bit headers) and
klang-toolkit/kextract#64 (Android callGeneric fallback).

Regenerated bindings:
- wgpu_hJvm.kt: JVM struct-layout registration split into per-struct
  helper functions (kextract #63, 64 KiB method limit) + whitespace.
- wgpu_hNative.kt: whitespace only.
- wgpu_hAndroid.kt: generic-path downcalls now scope their argument
  allocator in try/finally, drop the unused void return buffer, and
  read unsigned scalar returns through converted carriers (kextract
  #64) + whitespace (kextract #63).
- wgpu_hCommon.kt: unchanged.
@ygdrasil-io
ygdrasil-io merged commit d33776e into main Oct 4, 2026
4 checks passed
@ygdrasil-io
ygdrasil-io deleted the chore/bump-kextract-64-regenerate-bindings branch October 4, 2026 12:52
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