gfx-rs/wgpu-native

Is bindgen at build time still needed?

waywardmonkeys opened this issue · 2 comments

Now that PR #361 has landed and the bindings.rs only contains things prefixed with WGPU and wgpu, the OS-specific stuff is gone and what remains looks to be non-OS specific to me (unless I've missed something).

Would we be able to generate the bindings.rs and check it in to reduce build time (by not having to compile bindgen). This would also simplify things a bit by not needing a more current clang, perhaps improving on things for generating binary builds (as mentioned in the Wiki).

The long term plan I had in mind is to use the new webgpu.yml to generate all the structs, enums and extern "C" functions along with generating a large Trait that we would have to then impl.

This would eliminate any user errors that could occur currently when writing them by hand - like forgetting a function, mismatched types from the header, and so forth.

Also removing the need for checks.py, because we would get those checks done by the rust compiler for free.

the new webgpu.yml

I did not know about that yaml file yet. That's going to make our codegen at wgpu-py a lot easier ❤️ 🤯