D bindings to wgpu-native as an idiomatic wrapper around the library.
Targets wgpu-native v0.17.0.2
.
"dependencies": {
"wgpu-d": "0.3.1"
}
You can try the examples before installing:
dub run wgpu-d:headless
dub run wgpu-d:triangle
dub run wgpu-d:cube
Bindings to wgpu.h
are generated dynamically on your host system and loaded by D with ImportC. See the wgpu
Makefile task. The wgpu
task is automatically performed as a Dub pre-generate command.
The unit test executable is patched (patchelf
for Posix and install_name_tool
for mac OS) to correct the library load path such that libwgpu
is found.
See this StackOverflow answer.
make clean
- Bump the version constraint in subprojects/wgpu.Makefile.
dub test
- Ensure the examples compile:
dub build wgpu-d:headless
dub build wgpu-d:triangle
dub build wgpu-d:cube
- Fix any errors in the idiomatic wrapper