mirror of
https://github.com/outbackdingo/firezone.git
synced 2026-01-27 10:18:54 +00:00
We haven't updated `aya` in a while. Unfortunately, the update is not without problems. For one, the logging infrastructure changed, requiring us to drop the error details from `xdp_adjust_head`. See https://github.com/aya-rs/aya/issues/1348. Two, the `tokio` feature flag got removed but luckily that can be worked around quite easily. Resolves: #10344
25 lines
623 B
Rust
25 lines
623 B
Rust
#[cfg(target_os = "linux")]
|
|
fn main() -> anyhow::Result<()> {
|
|
use anyhow::Context as _;
|
|
use aya_build::cargo_metadata::{MetadataCommand, Package};
|
|
|
|
let package = MetadataCommand::new()
|
|
.no_deps()
|
|
.exec()
|
|
.context("MetadataCommand::exec")?
|
|
.packages
|
|
.into_iter()
|
|
.find(|Package { name, .. }| name.as_str() == "ebpf-turn-router")
|
|
.context("`ebpf-turn-router` package not found")?;
|
|
|
|
aya_build::build_ebpf(
|
|
[package],
|
|
aya_build::Toolchain::Custom("nightly-2025-05-30"),
|
|
)?;
|
|
|
|
Ok(())
|
|
}
|
|
|
|
#[cfg(not(target_os = "linux"))]
|
|
fn main() {}
|