-
Notifications
You must be signed in to change notification settings - Fork 2
Description
Figured it would be good to have a dedicated thread to discuss how to generate the unsafe raw C API bindings.
We need to generate bindings for the stable API, unstable API, and internal API.
Currently we are using bindgen, which works okay for our use cases, at least right now.
Bindgen has some downsides we should try to work around. Pre-generating bindings for tiered platforms could provide a means of reducing compile times and make libclang only a soft dependency. Ideally, instead of generating N bindings files for N platforms, we could generate 1 bindings file for a set of platforms.
I'd also like to move safe API wrappers out of cpython-sys into a new cpython-safe crate (cpython is claimed on crates.io, so we need a different name), so that cpython-sys is purely raw FFI bindings.