๐Ÿ“ฆ tychedelia / wgpu4j

Java bindings to wgpu-native

โ˜… 0 stars โ‘‚ 0 forks ๐Ÿ‘ 0 watching โš–๏ธ Apache License 2.0
javawebgpuwgpu
๐Ÿ“ฅ Clone https://github.com/tychedelia/wgpu4j.git
HTTPS git clone https://github.com/tychedelia/wgpu4j.git
SSH git clone git@github.com:tychedelia/wgpu4j.git
CLI gh repo clone tychedelia/wgpu4j
charlotte charlotte Clean up naming. 49540ee 7 months ago ๐Ÿ“ History
๐Ÿ“‚ main View all commits โ†’
๐Ÿ“ gradle
๐Ÿ“ src
๐Ÿ“ wgpu4j-examples
๐Ÿ“„ .gitignore
๐Ÿ“„ build.gradle.kts
๐Ÿ“„ gradlew
๐Ÿ“„ gradlew.bat
๐Ÿ“„ LICENSE-APACHE
๐Ÿ“„ LICENSE-MIT
๐Ÿ“„ README.md
๐Ÿ“„ README.md

wgpu4j

Java bindings for wgpu-native using Project Panama.

Requirements

  • Java 22+
  • jextract (for generating bindings)
  • macOS, Linux, or Windows (x86_64/aarch64)

Setup

Option 1: Automatic

Gradle will install jextract automatically if it is not found in your system PATH or JEXTRACT_HOME environment variable.

./gradlew downloadJextract

Option 2: Manual Installation

  • Download the appropriate build for your platform from jdk.java.net/jextract
  • Extract to a standard location:
  • Linux/macOS: ~/.local/jextract or /usr/local/jextract
  • Windows: %USERPROFILE%\AppData\Local\Programs\jextract or C:\Program Files\jextract
  • Add the bin directory to your PATH, or set JEXTRACT_HOME environment variable
  • On macOS: Run sudo xattr -r -d com.apple.quarantine /path/to/jextract to remove quarantine

Quick Start

./gradlew downloadWgpuNative
./gradlew generateBindings
./gradlew build

Run the triangle example:

cd wgpu4j-examples
../gradlew run

Usage

See the examples for usage patterns.