You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
aya/aya-bpf-macros
Michal Rostecki 6ad2c3c373 aya-bpf-macros: Allow to make programs public
Allow to define programs as public functions (even in library crates)
and then import them.

For example, we can have library crate with `libfoo/src/lib.rs`
containing:

```rust
pub fn my_xdp_program(ctx: XdpContext) -> u32 {
    xdp_action::XDP_PASS
}
```

And then a binary importing it:

```rust
pub use libfoo::my_xdp_program;
```

This way, commonly used eBPF programs can be distributed as lib crates.

Tested with: https://github.com/vadorovsky/aya-examples/tree/main/pub-progs

Signed-off-by: Michal Rostecki <vadorovsky@gmail.com>
2 years ago
..
src aya-bpf-macros: Allow to make programs public 2 years ago
Cargo.toml Change from Rust edition 2018 to 2021 2 years ago