Skip to content

Commit 108ef39

Browse files
polarathenealexforster
authored andcommitted
chore: Have bindgen use the rust-version
1 parent cad8320 commit 108ef39

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ authors = [
1414
]
1515
license = "BSD-2-Clause"
1616
edition = "2021"
17-
rust-version = "1.82"
17+
rust-version = "1.82" # first stable release to support "unsafe extern"
1818
build = "build.rs"
1919
links = "bpf"
2020
exclude = [

build.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ fn generate_bindings(src_dir: path::PathBuf) {
5858
&path::PathBuf::from(env::var_os("OUT_DIR").expect("OUT_DIR should always be set"));
5959

6060
bindgen::Builder::default()
61+
.rust_target(env!("CARGO_PKG_RUST_VERSION").parse().expect("valid"))
6162
.derive_default(true)
6263
.explicit_padding(true)
6364
.default_enum_style(bindgen::EnumVariation::Consts)

0 commit comments

Comments
 (0)