https://github.com/danny-yamamoto/rust-aya-dev
Hello Aya.
https://github.com/danny-yamamoto/rust-aya-dev
ebpf rust xdp
Last synced: about 1 month ago
JSON representation
Hello Aya.
- Host: GitHub
- URL: https://github.com/danny-yamamoto/rust-aya-dev
- Owner: danny-yamamoto
- Created: 2023-12-21T04:24:02.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-01-11T01:20:40.000Z (over 2 years ago)
- Last Synced: 2025-03-28T17:48:44.604Z (about 1 year ago)
- Topics: ebpf, rust, xdp
- Language: Rust
- Homepage:
- Size: 8.79 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# rust-aya-dev
## Prerequisites
1. Install bpf-linker: `cargo install bpf-linker`
## Build eBPF
```bash
cargo xtask build-ebpf
```
To perform a release build you can use the `--release` flag.
You may also change the target architecture with the `--target` flag.
## Build Userspace
```bash
cargo build
```
## Run
```bash
RUST_LOG=info cargo xtask run
```
log
```bash
user@rust:~/rust-aya-dev$ RUST_LOG=info cargo xtask run
warning: virtual workspace defaulting to `resolver = "1"` despite one or more workspace members being on edition 2021 which implies `resolver = "2"`
note: to keep the current resolver, specify `workspace.resolver = "1"` in the workspace root's manifest
note: to use the edition 2021 resolver, specify `workspace.resolver = "2"` in the workspace root's manifest
note: for more details see https://doc.rust-lang.org/cargo/reference/resolver.html#resolver-versions
Finished dev [unoptimized + debuginfo] target(s) in 0.07s
Running `target/debug/xtask run`
Finished dev [optimized] target(s) in 0.58s
warning: virtual workspace defaulting to `resolver = "1"` despite one or more workspace members being on edition 2021 which implies `resolver = "2"`
note: to keep the current resolver, specify `workspace.resolver = "1"` in the workspace root's manifest
note: to use the edition 2021 resolver, specify `workspace.resolver = "2"` in the workspace root's manifest
note: for more details see https://doc.rust-lang.org/cargo/reference/resolver.html#resolver-versions
Finished dev [unoptimized + debuginfo] target(s) in 0.12s
[2024-01-11T00:38:03Z INFO rust_aya_dev] Waiting for Ctrl-C...
[2024-01-11T00:38:03Z INFO rust_aya_dev] received a packet
[2024-01-11T00:38:03Z INFO rust_aya_dev] received a packet
[2024-01-11T00:38:03Z INFO rust_aya_dev] received a packet
[2024-01-11T00:38:03Z INFO rust_aya_dev] received a packet
```