diff --git a/.gitignore b/.gitignore index 9093ace2a..6db072ba2 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,5 @@ targets/ netavark.1 vendor/ .idea/* -src/proto-build/netavark_proxy.rs contrib/systemd/*/*.service .vscode* diff --git a/build.rs b/build.rs index 469bb1c45..13624ddcc 100644 --- a/build.rs +++ b/build.rs @@ -1,6 +1,6 @@ use chrono::{DateTime, Utc}; use std::env; -use std::path::{Path, PathBuf}; +use std::path::Path; use std::process::Command; fn main() { @@ -32,8 +32,7 @@ fn main() { .type_attribute( "netavark_proxy.NetworkConfig", "#[derive(serde::Serialize)]", - ) - .out_dir(PathBuf::from("src/proto-build")); + ); builder .compile_protos(&[Path::new("src/proto/proxy.proto")], &[Path::new("proto")]) diff --git a/src/dhcp_proxy/lib.rs b/src/dhcp_proxy/lib.rs index 2357d88c1..c8ec89be9 100644 --- a/src/dhcp_proxy/lib.rs +++ b/src/dhcp_proxy/lib.rs @@ -19,7 +19,7 @@ use tower::service_fn; #[allow(clippy::unwrap_used)] pub mod g_rpc { - include!("../proto-build/netavark_proxy.rs"); + include!(concat!(env!("OUT_DIR"), "/netavark_proxy.rs")); use crate::dhcp_proxy::lib::VectorConv; use crate::dhcp_proxy::types::{CustomErr, ProxyError}; use mozim::DhcpV4Lease; diff --git a/src/proto-build/.proto-build b/src/proto-build/.proto-build deleted file mode 100644 index e69de29bb..000000000