Bump edition to 2024

pull/153/head
Tamir Duberstein 5 days ago
parent 71c366d943
commit e50b81fd67
No known key found for this signature in database

@ -9,6 +9,7 @@ default-members = ["{{project-name}}", "{{project-name}}-common"]
[workspace.package]
license = "MIT OR Apache-2.0"
edition = "2024"
[workspace.dependencies]
aya = { version = "0.13.1", default-features = false }

@ -1,7 +1,7 @@
[package]
name = "{{project-name}}-common"
version = "0.1.0"
edition = "2021"
edition.workspace = true
license.workspace = true

@ -1,7 +1,7 @@
[package]
name = "{{ project-name }}-ebpf"
version = "0.1.0"
edition = "2021"
edition.workspace = true
[dependencies]
{{ project-name }}-common = { path = "../{{ project-name }}-common" }

@ -290,7 +290,7 @@ fn try_{{crate_name}}(ctx: RawTracePointContext) -> Result<i32, i32> {
}
{%- when "perf_event" %}
use aya_ebpf::{
helpers::bpf_get_smp_processor_id, macros::perf_event, programs::PerfEventContext, EbpfContext,
EbpfContext, helpers::bpf_get_smp_processor_id, macros::perf_event, programs::PerfEventContext,
};
use aya_log_ebpf::info;
@ -325,6 +325,6 @@ fn panic(_info: &core::panic::PanicInfo) -> ! {
loop {}
}
#[link_section = "license"]
#[no_mangle]
#[unsafe(link_section = "license")]
#[unsafe(no_mangle)]
static LICENSE: [u8; 13] = *b"Dual MIT/GPL\0";

@ -1,7 +1,7 @@
[package]
name = "{{project-name}}"
version = "0.1.0"
edition = "2021"
edition.workspace = true
license.workspace = true

@ -1,4 +1,4 @@
use anyhow::{anyhow, Context as _};
use anyhow::{Context as _, anyhow};
use aya_build::cargo_metadata;
fn main() -> anyhow::Result<()> {

@ -3,15 +3,15 @@
use aya::programs::KProbe;
{%- when "fentry" -%}
use anyhow::Context as _;
use aya::{programs::FEntry, Btf};
use aya::{Btf, programs::FEntry};
{%- when "fexit" -%}
use anyhow::Context as _;
use aya::{programs::FExit, Btf};
use aya::{Btf, programs::FExit};
{%- when "uprobe", "uretprobe" -%}
use aya::programs::UProbe;
{%- when "sock_ops" -%}
use anyhow::Context as _;
use aya::programs::{links::CgroupAttachMode, SockOps};
use aya::programs::{SockOps, links::CgroupAttachMode};
{%- when "sk_msg" -%}
use aya::{maps::SockHash, programs::SkMsg};
use {{crate_name}}_common::SockKey;
@ -19,27 +19,27 @@ use {{crate_name}}_common::SockKey;
use anyhow::Context as _;
use aya::programs::{Xdp, XdpFlags};
{%- when "classifier" -%}
use aya::programs::{tc, SchedClassifier, TcAttachType};
use aya::programs::{SchedClassifier, TcAttachType, tc};
{%- when "cgroup_skb" -%}
use anyhow::Context as _;
use aya::programs::{links::CgroupAttachMode, CgroupSkb, CgroupSkbAttachType};
use aya::programs::{CgroupSkb, CgroupSkbAttachType, links::CgroupAttachMode};
{%- when "cgroup_sysctl" -%}
use anyhow::Context as _;
use aya::programs::{links::CgroupAttachMode, CgroupSysctl};
use aya::programs::{CgroupSysctl, links::CgroupAttachMode};
{%- when "cgroup_sockopt" -%}
use anyhow::Context as _;
use aya::programs::{links::CgroupAttachMode, CgroupSockopt};
use aya::programs::{CgroupSockopt, links::CgroupAttachMode};
{%- when "tracepoint" -%}
use aya::programs::TracePoint;
{%- when "lsm" -%}
use aya::{programs::Lsm, Btf};
use aya::{Btf, programs::Lsm};
{%- when "perf_event" -%}
use aya::{
programs::{perf_event, PerfEvent},
programs::{PerfEvent, perf_event},
util::online_cpus,
};
{%- when "tp_btf" -%}
use aya::{programs::BtfTracePoint, Btf};
use aya::{Btf, programs::BtfTracePoint};
{%- when "socket_filter" -%}
use aya::programs::SocketFilter;
{%- when "raw_tracepoint" -%}

Loading…
Cancel
Save