mirror of
https://github.com/outbackdingo/firezone.git
synced 2026-01-27 10:18:54 +00:00
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:
committed by
GitHub
parent
e84bdc5566
commit
d07e32d91f
@@ -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"
|
||||
|
||||
@@ -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
1497
rust/relay/ebpf-turn-router/src/try_handle_turn.rs
Normal file
1497
rust/relay/ebpf-turn-router/src/try_handle_turn.rs
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user