mirror of
https://github.com/zhaofengli/attic.git
synced 2025-03-05 08:17:05 +00:00
attic: Split out stream feature
Right now it just depends on tokio, but the goal is to support alternative async runtimes.
This commit is contained in:
parent
acf3c351f8
commit
956d6915a5
3 changed files with 13 additions and 8 deletions
|
@ -50,14 +50,19 @@ tempfile = "3"
|
|||
version-compare = "0.2.0"
|
||||
|
||||
[features]
|
||||
default = [ "nix_store", "tokio" ]
|
||||
default = [
|
||||
"nix_store",
|
||||
"stream",
|
||||
"tokio",
|
||||
]
|
||||
|
||||
# Native libnixstore bindings.
|
||||
#
|
||||
# When disabled, the native Rust portions of nix_store can still be used.
|
||||
nix_store = [ "dep:cxx", "dep:cxx-build", "tokio/rt" ]
|
||||
nix_store = ["tokio", "dep:cxx", "dep:cxx-build"]
|
||||
|
||||
# Tokio.
|
||||
#
|
||||
# When disabled, any part depending on tokio is unavailable.
|
||||
tokio = [ "dep:tokio", "dep:async-stream" ]
|
||||
# Stream utilities.
|
||||
stream = ["tokio", "dep:async-stream"]
|
||||
|
||||
# Tokio runtime.
|
||||
tokio = ["dep:tokio", "tokio/rt"]
|
||||
|
|
|
@ -22,7 +22,7 @@ pub mod hash;
|
|||
pub mod mime;
|
||||
pub mod nix_store;
|
||||
pub mod signing;
|
||||
#[cfg(feature = "tokio")]
|
||||
#[cfg(feature = "stream")]
|
||||
pub mod stream;
|
||||
#[cfg(target_family = "unix")]
|
||||
pub mod testing;
|
||||
|
|
|
@ -19,7 +19,7 @@ path = "src/adm/main.rs"
|
|||
doc = false
|
||||
|
||||
[dependencies]
|
||||
attic = { path = "../attic", default-features = false, features = [ "tokio" ] }
|
||||
attic = { path = "../attic", default-features = false, features = ["stream", "tokio"] }
|
||||
attic-token = { path = "../token" }
|
||||
|
||||
anyhow = "1.0.71"
|
||||
|
|
Loading…
Add table
Reference in a new issue