Internal Structure

This page documents the non-library projects in the kgpu repo. These libraries should not be used directly and do not have stable APIs. If you want to see info about the different public modules kgpu provides, see this page

examples

This contains the example code for Kgpu. Like the core library, it is split into three parts: common, js, and jvm. The js and jvm modules are responible for setting up the basic application, and selecting which example to run.

The common folder contains all of the core code examples, and the resources used (images, shaders)

wgpuj

This module is written in Java and has the FFI code between the JVM and wgpu. It uses the jnr-ffi library, which creates JNI bindings at runtime. Most of the code in this module is generated by jnr-gen

wgpuj/jnrgen

jnr-gen is a tool that generates jnr enum and struct classes from the wgpu.h header. For more info see this page all about jnr-gen.