Commit Graph

134 Commits

Author SHA1 Message Date
dependabot[bot]
db64fcf73b build(deps): update public-api requirement in the cargo-crates group (#1488)
Updates the requirements on [public-api](https://github.com/cargo-public-api/cargo-public-api) to permit the latest version.

Updates `public-api` to 0.51.0
- [Release notes](https://github.com/cargo-public-api/cargo-public-api/releases)
- [Changelog](https://github.com/cargo-public-api/cargo-public-api/blob/main/CHANGELOG.md)
- [Commits](https://github.com/cargo-public-api/cargo-public-api/compare/public-api-v0.50.0...public-api-v0.51.0)

---
updated-dependencies:
- dependency-name: public-api
  dependency-version: 0.51.0
  dependency-type: direct:production
  dependency-group: cargo-crates
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-02 07:31:25 -08:00
dependabot[bot]
baa7ddb381 build(deps): bump the cargo-crates group with 2 updates
Updates the requirements on [libbpf-rs](https://github.com/libbpf/libbpf-rs) and [rand](https://github.com/rust-random/rand) to permit the latest version.

Updates `libbpf-rs` to 0.26.0
- [Release notes](https://github.com/libbpf/libbpf-rs/releases)
- [Commits](https://github.com/libbpf/libbpf-rs/compare/v0.25.0...v0.26.0)

Updates `rand` to 0.10.0
- [Release notes](https://github.com/rust-random/rand/releases)
- [Changelog](https://github.com/rust-random/rand/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-random/rand/compare/rand_core-0.9.1...0.10.0)

---
updated-dependencies:
- dependency-name: libbpf-rs
  dependency-version: 0.26.0
  dependency-type: direct:production
  dependency-group: cargo-crates
- dependency-name: rand
  dependency-version: 0.10.0
  dependency-type: direct:production
  dependency-group: cargo-crates
...

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Tamir Duberstein <tamird@gmail.com>
2026-02-09 16:09:10 -05:00
Tamir Duberstein
2f8759cc62 Dial the lints to 100 2026-01-29 10:02:48 -05:00
root
5cfe609872 integration-test: add btf_maps libbpf compatibility tests
Add integration tests to verify that btf_maps generated with the
generalized btf_map_def macro are compatible with libbpf's bpf_map_def.

Also add CI infrastructure for macOS cross-compilation to Linux musl,
including stub headers and autoconf cache variables for libbpf-sys
vendored dependencies.
2026-01-27 14:49:22 +00:00
dependabot[bot]
ecbb7b5272 build(deps): update nix requirement in the cargo-crates group
Updates the requirements on [nix](https://github.com/nix-rust/nix) to permit the latest version.

Updates `nix` to 0.31.1
- [Changelog](https://github.com/nix-rust/nix/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nix-rust/nix/compare/v0.30.1...v0.31.1)

---
updated-dependencies:
- dependency-name: nix
  dependency-version: 0.31.1
  dependency-type: direct:production
  dependency-group: cargo-crates
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-26 11:29:34 -05:00
famfo
dc12998268 aya-build: try to build when rustup is not found
In some environments, rustup is not availible but cargo and its targets
are. This changes aya-build to try to continue building if rustup is not
found, even with stable Rust. A warning will now be issued if rustup is
not found but the build will proceed regardless. Add a dependency on
`rustc_version` and condition `-Z build-std=core` on the toolchain being
nightly to allow custom toolchains with prebuilt ebpf sysroots.

Fixes: #1329
2026-01-26 10:38:15 -05:00
Tamir Duberstein
e746618143 enable unused_qualifications lint 2026-01-23 11:03:26 -05:00
dependabot[bot]
0a5c5e5594 build(deps): update rbpf requirement in the cargo-crates group
Updates the requirements on [rbpf](https://github.com/qmonnet/rbpf) to permit the latest version.

Updates `rbpf` to 0.4.0
- [Commits](https://github.com/qmonnet/rbpf/compare/v0.3.0...v0.4.0)

---
updated-dependencies:
- dependency-name: rbpf
  dependency-version: 0.4.0
  dependency-type: direct:production
  dependency-group: cargo-crates
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-19 11:46:41 -05:00
dependabot[bot]
a22ec3792a build(deps): update object requirement in the cargo-crates group
Updates the requirements on [object](https://github.com/gimli-rs/object) to permit the latest version.

Updates `object` to 0.38.0
- [Changelog](https://github.com/gimli-rs/object/blob/master/CHANGELOG.md)
- [Commits](https://github.com/gimli-rs/object/compare/0.37.0...0.38.0)

---
updated-dependencies:
- dependency-name: object
  dependency-version: 0.38.0
  dependency-type: direct:production
  dependency-group: cargo-crates
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-24 09:45:52 -05:00
Tamir Duberstein
866cbe4837 all: bump MSRV to 1.87.0
Use newly stabilized `is_multiple_of`.
2025-11-09 12:23:04 -05:00
Tamir Duberstein
b4bcf52ef1 aya-build: pass bpf_target_arch with cfg
Retire the use of `CARGO_CFG_BPF_TARGET_ARCH` -- using a `cfg` allows
cargo to properly use a cache per cfg, making `./clippy.sh` much faster.

```
Cold: ./clippy.sh --target x86_64-unknown-linux-gnu -p aya-build  75.38s user 137.28s system 211% cpu 1:40.43 total
Warm: ./clippy.sh --target x86_64-unknown-linux-gnu -p aya-build   4.46s user   3.41s system  71% cpu   11.01 total
```
2025-10-26 11:44:47 -04:00
Tamir Duberstein
17c7c7951c lints: enable clippy::as_underscore 2025-10-26 11:36:51 -04:00
Tamir Duberstein
778b447e3b lints: enable unsafe_op_in_unsafe_fn 2025-10-26 11:36:50 -04:00
Tamir Duberstein
9e577f60b5 integration-test: remove netns-rs
This crate uses a very old version of `nix` which is preventing us from
adding support for loongarch64.

Make panic-in-panic more uniform while I'm here.
2025-10-24 13:09:13 -04:00
Michal R
a7cfc694bd xtask: Allow to run VM integration tests without dpkg
Debian packages are just nested archives, where the outer one is ar
and the inner one is lzma2 tarball. Use Rust crates to unpack them.

Co-authored-by: Tamir Duberstein <tamird@gmail.com>
2025-10-23 21:17:31 +02:00
Tamir Duberstein
5f046899b5 xtask: teach integration-test vm to consume kernel debs directly
Bundle handling of Debian kernel archives into xtask so callers can pipe
the raw `.deb` paths straight into `cargo xtask integration-test vm …`.
The driver now extracts each archive into `<cache>/kernel-archives`,
locates the matching `vmlinuz-*`, `lib/modules/*`, and config files, and
feeds those into the initramfs build without requiring the user to
pre-run dpkg/tar. With this in place we drop
`.github/scripts/find_kernels.py`, simplify AGENTS.md/CI instructions to
use `find test/.tmp -name '*.deb'`, remove the gnu-tar requirement we no
longer need, and add `tar` as a workspace dependency for the extractor.
2025-10-08 08:59:03 -07:00
dependabot[bot]
ace02870f2 build(deps): update cargo_metadata requirement in the cargo-crates group
Updates the requirements on [cargo_metadata](https://github.com/oli-obk/cargo_metadata) to permit the latest version.

Updates `cargo_metadata` to 0.22.0
- [Release notes](https://github.com/oli-obk/cargo_metadata/releases)
- [Changelog](https://github.com/oli-obk/cargo_metadata/blob/main/CHANGELOG.md)
- [Commits](https://github.com/oli-obk/cargo_metadata/compare/0.22.0...0.22.0)

---
updated-dependencies:
- dependency-name: cargo_metadata
  dependency-version: 0.22.0
  dependency-type: direct:production
  dependency-group: cargo-crates
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-29 14:02:28 -04:00
Tamir Duberstein
5f5305c2a8 lint all crates; enable strict pointer lints 2025-09-29 05:19:23 -04:00
dependabot[bot]
a0b63b8811 build(deps): bump the cargo-crates group with 2 updates (#1333) 2025-09-02 10:34:23 +00:00
dependabot[bot]
9261554e3c build(deps): bump the cargo-crates group with 2 updates
Updates the requirements on [dialoguer](https://github.com/console-rs/dialoguer) and [network-types](https://github.com/vadorovsky/network-types) to permit the latest version.

Updates `dialoguer` to 0.11.0
- [Changelog](https://github.com/console-rs/dialoguer/blob/main/CHANGELOG.md)
- [Commits](https://github.com/console-rs/dialoguer/compare/v0.11.0...v0.11.0)

Updates `network-types` to 0.0.8
- [Release notes](https://github.com/vadorovsky/network-types/releases)
- [Changelog](https://github.com/vadorovsky/network-types/blob/main/CHANGELOG.md)
- [Commits](https://github.com/vadorovsky/network-types/compare/v0.0.8...v0.0.8)

---
updated-dependencies:
- dependency-name: dialoguer
  dependency-version: 0.11.0
  dependency-type: direct:production
  dependency-group: cargo-crates
- dependency-name: network-types
  dependency-version: 0.0.8
  dependency-type: direct:production
  dependency-group: cargo-crates
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-25 20:54:05 -04:00
dependabot[bot]
2869cb884c build(deps): update cargo_metadata requirement in the cargo-crates group
Updates the requirements on [cargo_metadata](https://github.com/oli-obk/cargo_metadata) to permit the latest version.

Updates `cargo_metadata` to 0.21.0
- [Release notes](https://github.com/oli-obk/cargo_metadata/releases)
- [Changelog](https://github.com/oli-obk/cargo_metadata/blob/main/CHANGELOG.md)
- [Commits](https://github.com/oli-obk/cargo_metadata/compare/0.21.0...0.21.0)

---
updated-dependencies:
- dependency-name: cargo_metadata
  dependency-version: 0.21.0
  dependency-type: direct:production
  dependency-group: cargo-crates
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-18 21:48:53 -04:00
dependabot[bot]
c251ec82c0 build(deps): update public-api requirement in the cargo-crates group
Updates the requirements on [public-api](https://github.com/cargo-public-api/cargo-public-api) to permit the latest version.

Updates `public-api` to 0.49.0
- [Release notes](https://github.com/cargo-public-api/cargo-public-api/releases)
- [Changelog](https://github.com/cargo-public-api/cargo-public-api/blob/main/CHANGELOG.md)
- [Commits](https://github.com/cargo-public-api/cargo-public-api/compare/public-api-v0.49.0...public-api-v0.49.0)

---
updated-dependencies:
- dependency-name: public-api
  dependency-version: 0.49.0
  dependency-type: direct:production
  dependency-group: cargo-crates
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-03 13:43:20 +00:00
dependabot[bot]
f635d80708 build(deps): bump the cargo-crates group across 1 directory with 2 updates
Updates the requirements on [cargo_metadata](https://github.com/oli-obk/cargo_metadata) and [public-api](https://github.com/cargo-public-api/cargo-public-api) to permit the latest version.

Updates `cargo_metadata` to 0.20.0
- [Release notes](https://github.com/oli-obk/cargo_metadata/releases)
- [Changelog](https://github.com/oli-obk/cargo_metadata/blob/main/CHANGELOG.md)
- [Commits](https://github.com/oli-obk/cargo_metadata/compare/0.20.0...0.20.0)

Updates `public-api` to 0.48.0
- [Release notes](https://github.com/cargo-public-api/cargo-public-api/releases)
- [Changelog](https://github.com/cargo-public-api/cargo-public-api/blob/main/CHANGELOG.md)
- [Commits](https://github.com/cargo-public-api/cargo-public-api/compare/public-api-v0.48.0...public-api-v0.48.0)

---
updated-dependencies:
- dependency-name: cargo_metadata
  dependency-version: 0.20.0
  dependency-type: direct:production
  dependency-group: cargo-crates
- dependency-name: public-api
  dependency-version: 0.48.0
  dependency-type: direct:production
  dependency-group: cargo-crates
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-07-17 15:28:03 -04:00
Tamir Duberstein
35332f2288 aya: remove AsyncPerfEventArray{,Buffer}
Rather than support N async runtimes, push this to the user. The
relevant types (`PerfEventArrayBuffer` and `RingBuffer`) implement
`As{,Raw}Fd` which is sufficient with integration with tokio, smol, and
other async runtimes.
2025-07-08 06:43:58 -04:00
dependabot[bot]
cfff75166c build(deps): update public-api requirement in the cargo-crates group
Updates the requirements on [public-api](https://github.com/cargo-public-api/cargo-public-api) to permit the latest version.

Updates `public-api` to 0.47.1
- [Release notes](https://github.com/cargo-public-api/cargo-public-api/releases)
- [Changelog](https://github.com/cargo-public-api/cargo-public-api/blob/main/CHANGELOG.md)
- [Commits](https://github.com/cargo-public-api/cargo-public-api/compare/public-api-v0.47.0...public-api-v0.47.1)

---
updated-dependencies:
- dependency-name: public-api
  dependency-version: 0.47.1
  dependency-type: direct:production
  dependency-group: cargo-crates
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-06-26 14:40:02 -07:00
dependabot[bot]
f96250e80d build(deps): bump the cargo-crates group with 2 updates
Updates the requirements on [bindgen](https://github.com/rust-lang/rust-bindgen) and [which](https://github.com/harryfei/which-rs) to permit the latest version.

Updates `bindgen` to 0.71.1
- [Release notes](https://github.com/rust-lang/rust-bindgen/releases)
- [Changelog](https://github.com/rust-lang/rust-bindgen/blob/main/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/rust-bindgen/compare/v0.71.0...v0.71.1)

Updates `which` to 7.0.3
- [Release notes](https://github.com/harryfei/which-rs/releases)
- [Changelog](https://github.com/harryfei/which-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/harryfei/which-rs/compare/7.0.0...7.0.3)

---
updated-dependencies:
- dependency-name: bindgen
  dependency-version: 0.71.1
  dependency-type: direct:production
  dependency-group: cargo-crates
- dependency-name: which
  dependency-version: 7.0.3
  dependency-type: direct:production
  dependency-group: cargo-crates
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-06-09 10:11:33 -04:00
dependabot[bot]
a7e3e6d4d9 build(deps): bump the cargo-crates group with 2 updates
Updates the requirements on [cargo_metadata](https://github.com/oli-obk/cargo_metadata) and [object](https://github.com/gimli-rs/object) to permit the latest version.

Updates `cargo_metadata` to 0.19.2
- [Release notes](https://github.com/oli-obk/cargo_metadata/releases)
- [Changelog](https://github.com/oli-obk/cargo_metadata/blob/main/CHANGELOG.md)
- [Commits](https://github.com/oli-obk/cargo_metadata/compare/0.19.0...0.19.2)

Updates `object` to 0.36.7
- [Changelog](https://github.com/gimli-rs/object/blob/master/CHANGELOG.md)
- [Commits](https://github.com/gimli-rs/object/compare/0.36.0...0.36.7)

---
updated-dependencies:
- dependency-name: cargo_metadata
  dependency-version: 0.19.2
  dependency-type: direct:production
  dependency-group: cargo-crates
- dependency-name: object
  dependency-version: 0.36.7
  dependency-type: direct:production
  dependency-group: cargo-crates
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-06-02 14:56:17 -04:00
Tyrone Wu
ab77decd9a aya,aya-obj: add feature probing program type
Adds API that probes whether kernel supports a program type.
2025-05-14 08:03:51 -04:00
dependabot[bot]
95c03e6600 build(deps): update nix requirement in the cargo-crates group
Updates the requirements on [nix](https://github.com/nix-rust/nix) to permit the latest version.

Updates `nix` to 0.29.0
- [Changelog](https://github.com/nix-rust/nix/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nix-rust/nix/compare/v0.29.0...v0.29.0)

---
updated-dependencies:
- dependency-name: nix
  dependency-version: 0.29.0
  dependency-type: direct:production
  dependency-group: cargo-crates
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-05 14:26:43 +00:00
dependabot[bot]
c0ff1aa0cc build(deps): update network-types requirement in the cargo-crates group
Updates the requirements on [network-types](https://github.com/vadorovsky/network-types) to permit the latest version.

Updates `network-types` to 0.0.7
- [Release notes](https://github.com/vadorovsky/network-types/releases)
- [Changelog](https://github.com/vadorovsky/network-types/blob/main/CHANGELOG.md)
- [Commits](https://github.com/vadorovsky/network-types/compare/v0.0.7...v0.0.7)

---
updated-dependencies:
- dependency-name: network-types
  dependency-version: 0.0.7
  dependency-type: direct:production
  dependency-group: cargo-crates
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-21 10:53:29 -04:00
Tamir Duberstein
eab5661a0e aya-build: enable BTF 2025-04-21 10:11:26 -04:00
Tamir Duberstein
680402be0c Revert "ci: download gen_init_cpio with authentication"
This removes octorust which takes absolutely ages to compile and also
requires native TLS libraries which in turn require a C toolchain. The
latter is a pain when cross compiling from macOS.

This reverts commit cc2da4a2a4.
2025-04-08 07:59:35 -04:00
Tamir Duberstein
fe8e1c48b0 Remove getrandom patch
https://github.com/rust-random/getrandom/releases/tag/v0.3.2 contains
b75db5cede.
2025-04-02 10:22:55 -04:00
dependabot[bot]
ac6b04fa1d build(deps): update public-api requirement in the cargo-crates group
Updates the requirements on [public-api](https://github.com/cargo-public-api/cargo-public-api) to permit the latest version.

Updates `public-api` to 0.44.2
- [Release notes](https://github.com/cargo-public-api/cargo-public-api/releases)
- [Changelog](https://github.com/cargo-public-api/cargo-public-api/blob/main/CHANGELOG.md)
- [Commits](https://github.com/cargo-public-api/cargo-public-api/compare/public-api-v0.44.0...public-api-v0.44.2)

---
updated-dependencies:
- dependency-name: public-api
  dependency-type: direct:production
  dependency-group: cargo-crates
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-31 13:36:22 +00:00
Dave Tucker
3078e5aba0 chore: Fix clippy panic_handler warnings
Working with aya in vscode will currently show a number of warnings
along the lines of:

```
found duplicate lang item `panic_impl`
the lang item is first defined in crate `std` (which `aya` depends on)
...
second definition in the local crate (`bpf_probe_read`)
```

This comes from feature unification.
integration-test requires the integration-common user feature, which
requires aya, which in turn brings in std.

For this same reason we avoid running clippy across the whole workspace.

We can avoid this issue by using the panic handler from the another
crate, which implements the same loop {} panic handler we use today.
It seems rustc is happy to conditionally link the panic handler
from an external crate without issuing warnings.

Therefore, we add our own crate - ebpf-panic - for this purpose.

Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
2025-03-27 17:45:46 +00:00
Dave Tucker
da3f09e28b chore: move network-types to workspace dep
Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
2025-03-27 16:14:35 +00:00
Dave Tucker
f6c5cb2ad2 chore(*): set clippy unused_trait_names = warn
We have previously tried to import traits anonymously where possible but
enforcing this manually was hard.

Since Rust 1.83 clippy can now enforce this for us.

Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
2025-03-20 15:16:11 +00:00
Dave Tucker
abe5f743a3 feat: Refactor init into test-distro
The init module contains a small init system for running our integration
tests against a kernel. While we don't need a full-blown linux distro,
we do need some utilities.

Once such utility is `modprobe` which allows us to load kernel modules.
Rather than create a new module for this utility, I've instead
refactored `init` into `test-distro` which is a module that contains
multiple binaries.

The xtask code has been adjusted to ensure these binaries are inserted
into the correct places in our cpio archive, as well as bringing in the
kernel modules.

Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
2025-03-19 19:11:15 +00:00
Tamir Duberstein
509032f195 integration-test: use scopeguard over panic hook 2025-03-17 11:38:09 -04:00
Tamir Duberstein
49a828ec56 taplo: reorder-keys
Group non-workspace keys before workspace ones for readability.
2025-03-17 11:38:09 -04:00
Tamir Duberstein
1ff2c0a2d2 Cargo.toml: sort dependencies 2025-03-17 11:38:09 -04:00
WANG Rui
e3aa47f0db Update octorust to 0.10 2025-03-14 09:08:58 +00:00
Tamir Duberstein
a43e40ae1d introduce workspace lints, warn on unused crates
In practice this will forbid unused dependencies because we run clippy
with `--deny warnings`.

Workspace lints is a nice place to ratchet up lints through the codebase
all at once and consistently.
2025-03-06 14:46:03 -05:00
Tamir Duberstein
f0a9f19ddc Bump edition to 2024
Change FromRawTracepointArgs::arg to return T rather than *const T which
seems to have been returning a dangling pointer.

Arguably this is not strictly necessary; edition 2024 seems to be
focused on increased strictness around unsafe code which doesn't unlock
new functionality for our users. That said, this work revealed an
apparent bug (see above) that we wouldn't otherwise catch due to
allow-by-default lints.
2025-03-04 10:43:56 -05:00
Tamir Duberstein
9e52d2c123 Correctly specify git dependency
Fixes #1178.
2025-02-21 09:16:18 -05:00
dependabot[bot]
5e5cd29922 build(deps): update rand requirement
Updates the requirements on [rand](https://github.com/rust-random/rand) to permit the latest version.

Updates `rand` to 0.8.5
- [Release notes](https://github.com/rust-random/rand/releases)
- [Changelog](https://github.com/rust-random/rand/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-random/rand/compare/0.8.0...0.8.5)

---
updated-dependencies:
- dependency-name: rand
  dependency-type: direct:production
  dependency-group: cargo-crates
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-13 10:50:47 -05:00
Tamir Duberstein
c608a2d3d2 Update public-api to 0.44.0 2025-02-13 09:59:59 -05:00
Dave Tucker
1495a93c45 ci: Include mips architecture in tests
Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
2025-01-31 18:34:04 +00:00
Tamir Duberstein
e46fae7459 Update public-api to 0.43.0 2025-01-27 12:48:23 +02:00
dependabot[bot]
af4254bc57 build(deps): update octorust requirement in the cargo-crates group
---
updated-dependencies:
- dependency-name: octorust
  dependency-type: direct:production
  dependency-group: cargo-crates
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-12-23 13:11:01 +00:00