-
Notifications
You must be signed in to change notification settings - Fork 246
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(examples): Restructure allowed_memory test
Moving the source code for the ebpf program into a subfolder will prevent it from accidentally being run as an example. We are still committing the resulting object file, to prevent creating a hard dependency on the aya build toolchain to run the example tests in this repository. Signed-off-by: Wouter Dullaert <[email protected]>
- Loading branch information
Showing
7 changed files
with
52 additions
and
9 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
[build] | ||
target = "bpfel-unknown-none" | ||
rustflags = "-C debuginfo=2 -C link-arg=--btf" | ||
|
||
[unstable] | ||
build-std = ["core"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
[package] | ||
name = "allowed-memory" | ||
version = "0.1.0" | ||
edition = "2021" | ||
license = "Apache-2.0/MIT" | ||
|
||
[dependencies] | ||
aya-ebpf = "0.1.0" | ||
|
||
[[bin]] | ||
name = "allowed-memory" | ||
path = "src/main.rs" | ||
test = false | ||
bench = false | ||
|
||
[profile.dev] | ||
opt-level = 3 | ||
debug = false | ||
debug-assertions = false | ||
overflow-checks = false | ||
lto = true | ||
panic = "abort" | ||
incremental = false | ||
codegen-units = 1 | ||
rpath = false | ||
|
||
[profile.release] | ||
lto = true | ||
panic = "abort" | ||
codegen-units = 1 | ||
|
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
[toolchain] | ||
channel = "nightly" | ||
# The source code of rustc, provided by the rust-src component, is needed for | ||
# building eBPF programs. | ||
components = [ | ||
"cargo", | ||
"clippy", | ||
"rust-docs", | ||
"rust-src", | ||
"rust-std", | ||
"rustc", | ||
"rustfmt", | ||
] |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters