This project focuses on creating a binding for WebGPU which can support Kotlin on multiple platforms.
- Prerequisites
- How to run the demo projects from library sources
- Getting started
- Compatibility
- Backend
- Project Phases
- Gradle 8.8
- JDK 22+
- A recent version of Chrome or Firefox Nightly for web browser execution. Check compatibility here.
git clone https://github.com/wgpu4k/wgpu4k.git
cd wgpu4k
- On desktop JVM:
./gradlew examples:glfw:run
- On web js:
./gradlew examples:web-js:jsBrowserRun
- On web wasm:
./gradlew examples:web-js:wasmJsBrowserRun
- On desktop native (Mac only and still experimental)
./gradlew examples:native:runDebugExecutableNative
- On android (experimental)
./gradlew wgpu4k:build
to build the JNI library, then you can run the subprojectandroid
with android studio - On iOS (experimental)
./gradlew examples:iOS:assembleWgpuAppXCFramework
to build the XC Framework, then you can run the subprojectiosApp
with XCode on a iOS simulator or real device.
Use page down
and page up
on your keyboard to switch scene.
Documentation will be added later, to start you can check out the minimalist project here or see scenes implemented to end-to-end tests here.
Target | Windows | Linux | MacOs | iOS | Android |
---|---|---|---|---|---|
JVM x64 | ✅ | 🆗 | 🆗 | ❌ | 🛠️ |
JVM arm64 | 🔍️ | 🆗 | ✅ | ❌ | 🛠️ |
JS | ✅ | 🆗 | ✅ | ❓ | ❓️ |
wasm | 🆗️ | 🆗️ | 🆗️ | ❓️ | ❓️ |
native x64 | 🛠️ | 🔍️ | 🛠️ | 🛠️ | ❌️️ |
native arm64 | 🔍️ | 🔍️ | 🛠️ | 🛠️ | ❌️️ |
✅ = First class citizen
🆗 = Best effort
❓ = Untested, could work
🛠️ = Work in progress
🔍 = Unsupported yet, open to contributions
❌ = Not applicable
On JVM we are using the firefox backend, see the GitHub page to get more information.
The current one, the aim of this phase is to test the technology on as many platforms as possible using elementary examples.
The entire API is implemented in this phase.
In this phase, the API is fine-tuned to be more idiomatic to Kotlin.
This is the final phase when the project is ready for production.