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
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 x86 | 🛠️ | 🛠️ | 🆗️ | 🛠️ | 🛠️ |
native arm64 | 🛠️ | 🛠️ | 🆗️ | 🛠️ | 🛠️ |
✅ = First class citizen
🆗 = Best effort
❓ = Untested, could work
🛠️ = 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.