bindgen spells the log callback's va_list parameter the way the host
that ran it does. The bindings are generated once and compiled
everywhere, so that spelling only happens to be right on the generating
host.
This was alright for most hosts but is fragile on aarch64 where va_list
is a plain 32 bytes struct.
Given we only forward the list to vsnprintf, extracting and simplifying
the cross-platform rust implementation from the unstable std-lib is
cheap and sound. We will just have to re-export the official type once
it's stablilized.
Generating the FFI bindings at consumer build time is unecessary. The
`use-bindgen` Cargo feature was non-additive, and forced bindgen +
libclang onto every build that opted in, for a decision that is really
about the maintainer's environment, not the public API.
Move binding generation out of the build entirely, following the xtask
pattern[^1]:
- build.rs is reduced to locating and linking libvlc.
- Regeneration lives in a `xtask` crate, run with `cargo xtask bindgen`.
[^1]: <https://github.com/matklad/cargo-xtask>
binding.rs generation with bindgen is optional.
By default, a pre-generated binding.rs is copied in OUT_DIR. This allows
for example to build on Windows and link against a standard VLC
installation.
Feature "use-bindgen" will trigger binding generation.