chore: Build whole workspace on macos (#10228)

- Add some macos stubs to gui-smoke-test.
- Hide `ebpf-turn-router` binary functionality behind `#[cfg(target_arch
= "bpf")]`

Signed-off-by: Mariusz Klochowicz <mariusz@klochowicz.com>
This commit is contained in:
Mariusz Klochowicz
2025-09-02 16:25:53 +09:30
committed by GitHub
parent e84bdc5566
commit d07e32d91f
6 changed files with 1561 additions and 1467 deletions

View File

@@ -4,6 +4,11 @@ version = "0.1.0"
edition = { workspace = true }
license = { workspace = true }
[package.metadata.cargo-udeps.ignore]
normal = ["aya-ebpf", "aya-log-ebpf", "ebpf-shared", "network-types"]
build = ["which"]
development = ["hex-literal", "ip-packet"]
[[bin]]
name = "ebpf-turn-router-main" # This needs to be different from the package name otherwise the build-script fails to differentiate between the directory it is built in and the actual binary.
path = "src/main.rs"

View File

@@ -1,5 +1,3 @@
use which::which;
/// Building this crate has an undeclared dependency on the `bpf-linker` binary. This would be
/// better expressed by [artifact-dependencies][bindeps] but issues such as
/// https://github.com/rust-lang/cargo/issues/12385 make their use impractical for the time being.
@@ -11,7 +9,14 @@ use which::which;
/// which would likely mean far too much cache invalidation.
///
/// [bindeps]: https://doc.rust-lang.org/nightly/cargo/reference/unstable.html?highlight=feature#artifact-dependencies
#[cfg(target_os = "linux")]
fn main() {
use which::which;
let bpf_linker = which("bpf-linker").expect("bpf-linker not found in $PATH");
println!("cargo:rerun-if-changed={}", bpf_linker.to_str().unwrap());
}
#[cfg(not(target_os = "linux"))]
fn main() {
println!("cargo:warning=eBPF is only supported on Linux, skipping bpf-linker check");
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff