diff --git a/rust/agama-network/Cargo.toml b/rust/agama-network/Cargo.toml index 635f119306..56fbe052c6 100644 --- a/rust/agama-network/Cargo.toml +++ b/rust/agama-network/Cargo.toml @@ -5,7 +5,7 @@ rust-version.workspace = true edition.workspace = true [dependencies] -agama-utils = { path = "../agama-utils" } +agama-utils = { path = "../agama-utils", default-features = false } anyhow = "1.0.98" async-trait = "0.1.88" cidr = { version = "0.3.1", features = ["serde"] } diff --git a/rust/agama-utils/Cargo.toml b/rust/agama-utils/Cargo.toml index a8758816b7..1df57b40f7 100644 --- a/rust/agama-utils/Cargo.toml +++ b/rust/agama-utils/Cargo.toml @@ -4,9 +4,13 @@ version = "0.1.0" rust-version.workspace = true edition.workspace = true +[features] +default = ["curl"] +curl = ["dep:agama-transfer"] + [dependencies] agama-locale-data = { path = "../agama-locale-data" } -agama-transfer = { path = "../agama-transfer" } +agama-transfer = { path = "../agama-transfer", optional = true } async-trait = "0.1.89" camino = "1.2.1" serde = { version = "1.0.228", features = ["derive"] } diff --git a/rust/agama-utils/src/api.rs b/rust/agama-utils/src/api.rs index 194555cd33..e424d87af7 100644 --- a/rust/agama-utils/src/api.rs +++ b/rust/agama-utils/src/api.rs @@ -39,13 +39,17 @@ pub use issue::{Issue, IssueMap, IssueWithScope}; mod system_info; pub use system_info::SystemInfo; +#[cfg(feature = "curl")] pub mod config; +#[cfg(feature = "curl")] pub use config::Config; mod raw_config; pub use raw_config::RawConfig; +#[cfg(feature = "curl")] pub mod patch; +#[cfg(feature = "curl")] pub use patch::Patch; mod proposal; @@ -55,6 +59,7 @@ mod action; pub use {action::Action, action::FinishMethod}; pub mod bootloader; +#[cfg(feature = "curl")] pub mod files; pub mod hostname; pub mod iscsi;