Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is bindgen at build time still needed? #365

Open
waywardmonkeys opened this issue Jan 29, 2024 · 2 comments
Open

Is bindgen at build time still needed? #365

waywardmonkeys opened this issue Jan 29, 2024 · 2 comments

Comments

@waywardmonkeys
Copy link
Contributor

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).

@rajveermalviya
Copy link
Collaborator

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.

@almarklein
Copy link
Collaborator

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 ❤️ 🤯

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants