From 96b282d149bdafc91bd0455bc09ecf2ebf1e0c82 Mon Sep 17 00:00:00 2001 From: Dmitry Savintsev Date: Thu, 9 Feb 2023 11:07:42 +0100 Subject: [PATCH] aya-tool: remove outdated workaround The comment says that `.derive_debug` was needed as a workaround for https://github.com/rust-lang/rust-bindgen/issues/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 --- aya-tool/Cargo.toml | 2 +- aya-tool/src/bindgen.rs | 7 ------- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/aya-tool/Cargo.toml b/aya-tool/Cargo.toml index f1378e6f..8f7d9f93 100644 --- a/aya-tool/Cargo.toml +++ b/aya-tool/Cargo.toml @@ -5,7 +5,7 @@ authors = ["Alessandro Decina "] edition = "2021" [dependencies] -bindgen = "0.63" +bindgen = "0.64" clap = { version = "4", features = ["derive"] } anyhow = "1" thiserror = "1" diff --git a/aya-tool/src/bindgen.rs b/aya-tool/src/bindgen.rs index 2d710534..eedff6d8 100644 --- a/aya-tool/src/bindgen.rs +++ b/aya-tool/src/bindgen.rs @@ -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) }