attic: Allow disabling tokio
Not needed at all for parsing usecases.
This commit is contained in:
parent
6969af2d5e
commit
eb34b8ee99
|
@ -28,6 +28,7 @@ cxx = { version = "1.0", optional = true }
|
||||||
|
|
||||||
[dependencies.tokio]
|
[dependencies.tokio]
|
||||||
version = "1.23.0"
|
version = "1.23.0"
|
||||||
|
optional = true
|
||||||
features = [
|
features = [
|
||||||
"fs",
|
"fs",
|
||||||
"io-util",
|
"io-util",
|
||||||
|
@ -45,9 +46,14 @@ cxx-build = { version = "1.0", optional = true }
|
||||||
pkg-config = "0.3.26"
|
pkg-config = "0.3.26"
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = [ "nix_store" ]
|
default = [ "nix_store", "tokio" ]
|
||||||
|
|
||||||
# Native libnixstore bindings.
|
# Native libnixstore bindings.
|
||||||
#
|
#
|
||||||
# When disabled, the native Rust portions of nix_store can still be used.
|
# When disabled, the native Rust portions of nix_store can still be used.
|
||||||
nix_store = [ "cxx", "bindgen", "cxx-build" ]
|
nix_store = [ "dep:cxx", "dep:bindgen", "dep:cxx-build" ]
|
||||||
|
|
||||||
|
# Tokio.
|
||||||
|
#
|
||||||
|
# When disabled, any part depending on tokio is unavailable.
|
||||||
|
tokio = [ "dep:tokio" ]
|
||||||
|
|
|
@ -22,8 +22,10 @@ pub mod hash;
|
||||||
pub mod mime;
|
pub mod mime;
|
||||||
pub mod nix_store;
|
pub mod nix_store;
|
||||||
pub mod signing;
|
pub mod signing;
|
||||||
|
#[cfg(feature = "tokio")]
|
||||||
pub mod stream;
|
pub mod stream;
|
||||||
pub mod testing;
|
pub mod testing;
|
||||||
|
#[cfg(feature = "tokio")]
|
||||||
pub mod util;
|
pub mod util;
|
||||||
|
|
||||||
pub use error::{AtticError, AtticResult};
|
pub use error::{AtticError, AtticResult};
|
||||||
|
|
|
@ -19,7 +19,7 @@ path = "src/adm/main.rs"
|
||||||
doc = false
|
doc = false
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
attic = { path = "../attic", default-features = false }
|
attic = { path = "../attic", default-features = false, features = [ "tokio" ] }
|
||||||
attic-token = { path = "../token" }
|
attic-token = { path = "../token" }
|
||||||
|
|
||||||
anyhow = "1.0.68"
|
anyhow = "1.0.68"
|
||||||
|
|
Loading…
Reference in a new issue