[WebGPU][Kotlin] Register JNI natives in JNI_OnLoad Registers all generated Kotlin JNI methods in `JNI_OnLoad` via `RegisterNatives` on `GPU<Obj>Kt` and `GPU` using per-class `JNINativeMethod` tables, logs any failure via `ExceptionDescribe()`, and makes the generated C++ entry points `static`. This enables `@FastNative` on Android 8–11 (`minSdk 26`) and fails fast on library load if any JNI signature mismatches. Stripped `arm64-v8a/libwebgpu_c_bundled.so` size impact vs. Opt 1: - Exported dynamic symbols: 200 -> 27 (-173 / -86.5%) - `.dynsym` + `.dynstr`: 27,531 B -> 13,499 B (-14,032 B / -13.7 KB) - `.text`: 6,545,844 B -> 6,542,268 B (-3,576 B / -3.5 KB) - `.data.rel.ro`: 198,712 B -> 202,888 B (+4,176 B / +4.1 KB) - Compressed `.so` in AAR: 3,442,720 B -> 3,442,681 B (-39 B) Bug: b/567498740 Test: ./gradlew :webgpu:testDebugUnitTest :webgpu:connectedDebugAndroidTest Change-Id: I3e319fbe26057b53683aa875c76f52701b1a074f Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/348575 Commit-Queue: Mridul Goyal <mridulgoyal@google.com> Reviewed-by: Tarun Saini <sainitarun@google.com> Reviewed-by: Nikita Gupta <nikigupta@google.com>
Dawn is an open-source and cross-platform implementation of the WebGPU standard. More precisely it implements webgpu.h that is a one-to-one mapping with the WebGPU IDL. Dawn is meant to be integrated as part of a larger system and is the underlying implementation of WebGPU in Chromium.
Dawn provides several WebGPU building blocks:
webgpu.h version that Dawn implements.webgpu.h.Helpful links:
Developer documentation:
User documentation: (TODO, figure out what overlaps with the webgpu.h docs)
BSD 3-Clause License, please see LICENSE.
This is not an officially supported Google product.