Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
85: Start migration from cbindgen to bindgen r=kvark a=DevOrc Fix for #78 - has rust types generated by the header instead of vice-versa. Currently still needs a lot of work (most of the original codebase is deleted 😞 ) but I am slowly reimplementing everything with the generated types. Currently the triangle and compute examples _should_ work on Windows and Linux. Anyways, thought I would post this here to get initial thoughts before I finished adding everything. ## Big changes - all of the header types are generated at build time and inserted into the `crate::native` module - enums are mapped from their c types to wgt using a macro (map_enum!) - two c headers (`ffi/webgpu.h` for things in the [webgpu-native](https://github.com/webgpu-native/webgpu-headers) headers, and `ffi/wgpu.h` for stuff unique to wgpu-native) ## Small Notes - auto-generated bindings are modified at build time to change all of the *Impl to Ids (`BindGroupImpl` -> `wgc::id::BindGroupId`) - libclang now required to build (required by bindgen) - enum constants are i32 on windows and are u32 on macos/linux - example shaders are now written in WGSL - Had to change some of the makefiles for windows c development (if anyone has a better way to write makefiles please let me know :smile:) ## Stuff that still needs to be added - [x] MacOS Surfaces - [ ] Wayland Surfaces - [x] most commands - [x] undelete / update the capture example - [x] logging - [x] Textures - [x] Fix IOS - [ ] Include webgpu.h in release CI Co-authored-by: Noah Charlton <ncharlton002@gmail.com>
- Loading branch information