Pre-generate bindgen file · Issue #12 · godot-rust/gdext (original) (raw)

Bindgen not only adds a ton of dependencies that slow down initial compilation, but it is regularly an obstacle for users to get started, because they don't have LLVM installed or correctly configured.

We could generate the bindings Rust file on developer machines and ship it. CI could be used to enforce that bindings are up-to-date.

If it turns out that different platforms have different binding files, conditional compilation is an option. Would add a bit of development of maintenance effort, but probably worth the easier and faster setup process for everyone.