Skip to content

Commit

Permalink
aya-tool: remove outdated workaround
Browse files Browse the repository at this point in the history
The comment says that `.derive_debug` was needed as
a workaround for rust-lang/rust-bindgen#2083.
This issue is now closed, and aya-tool compiles without derive_debug.

Additionally, update bindgen dependency to 1.64.

Signed-off-by: Dmitry Savintsev <dsavints@gmail.com>
  • Loading branch information
dmitris committed Feb 9, 2023
1 parent be5b4c8 commit 96b282d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
2 changes: 1 addition & 1 deletion aya-tool/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ authors = ["Alessandro Decina <alessandro.d@gmail.com>"]
edition = "2021"

[dependencies]
bindgen = "0.63"
bindgen = "0.64"
clap = { version = "4", features = ["derive"] }
anyhow = "1"
thiserror = "1"
Expand Down
7 changes: 0 additions & 7 deletions aya-tool/src/bindgen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,4 @@ pub fn bpf_builder() -> Builder {
.clang_arg("-Wno-unknown-attributes")
.default_enum_style(EnumVariation::ModuleConsts)
.prepend_enum_name(false)
// NOTE(vadorovsky): It's a workaround for the upstream bindgen issue:
// https://github.com/rust-lang/rust-bindgen/issues/2083
// tl;dr: Rust nightly complains about #[repr(packed)] structs deriving
// Debug without Copy.
// It needs to be fixed properly upstream, but for now we have to
// disable Debug derive here.
.derive_debug(false)
}

0 comments on commit 96b282d

Please sign in to comment.