build: bump bindgen to 0.72 and migrate to the allowlist API
bindgen 0.59, relied on the now-deprecated whitelist_* builder methods and the bare CargoCallbacks unit struct. Move to 0.72 and its current API.merge-requests/17/head
parent
9be21665c8
commit
656aa597fa
|
|
@ -22,7 +22,7 @@ crate-type = ["rlib"]
|
|||
libc = "0.2"
|
||||
|
||||
[build-dependencies]
|
||||
bindgen = {version = "0.59", optional = true }
|
||||
bindgen = { version = "0.72", optional = true }
|
||||
pkg-config = "0.3"
|
||||
|
||||
[target.'cfg(target_os = "windows")'.build-dependencies]
|
||||
|
|
|
|||
|
|
@ -12,12 +12,12 @@ fn generate_bindings() {
|
|||
.use_core()
|
||||
// Use libc
|
||||
.ctypes_prefix("libc")
|
||||
// Whitelist
|
||||
.whitelist_type(".*vlc.*")
|
||||
.whitelist_function(".*vlc.*")
|
||||
.whitelist_var(".*vlc.*")
|
||||
.whitelist_function("vsnprintf")
|
||||
.parse_callbacks(Box::new(bindgen::CargoCallbacks));
|
||||
// Allowlist every (lib)vlc symbol.
|
||||
.allowlist_item("(lib|LIB)?(vlc|VLC)_.*")
|
||||
// Required by the Windows `legacy_stdio_definitions` link workaround
|
||||
// (see `windows::link_vlc`).
|
||||
.allowlist_function("vsnprintf")
|
||||
.parse_callbacks(Box::new(bindgen::CargoCallbacks::new()));
|
||||
|
||||
// Set header include paths
|
||||
let pkg_config_library = pkg_config::Config::new().probe("libvlc").unwrap();
|
||||
|
|
|
|||
Loading…
Reference in New Issue