A fork of attic a self-hostable Nix Binary Cache server
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

attic: Rename stream to io

+12 -12
+4 -4
attic/Cargo.toml
··· 53 53 [features] 54 54 default = [ 55 55 "chunking", 56 + "io", 56 57 "nix_store", 57 - "stream", 58 58 "tokio", 59 59 ] 60 60 61 61 # Chunking. 62 - chunking = ["tokio", "stream", "dep:async-stream"] 62 + chunking = ["tokio", "io", "dep:async-stream"] 63 63 64 64 # Native libnixstore bindings. 65 65 # ··· 73 73 "dep:system-deps", 74 74 ] 75 75 76 - # Stream utilities. 77 - stream = ["tokio", "dep:async-stream"] 76 + # IO utilities. 77 + io = ["tokio", "dep:async-stream"] 78 78 79 79 # Tokio runtime. 80 80 tokio = ["dep:tokio", "tokio/rt", "tokio/time"]
+1 -1
attic/src/chunking/mod.rs
··· 9 9 use futures::stream::Stream; 10 10 use tokio::io::AsyncRead; 11 11 12 - use crate::stream::read_chunk_async; 12 + use crate::io::read_chunk_async; 13 13 14 14 /// Splits a streams into content-defined chunks. 15 15 ///
+2 -2
attic/src/lib.rs
··· 24 24 pub mod mime; 25 25 pub mod nix_store; 26 26 pub mod signing; 27 - #[cfg(feature = "stream")] 28 - pub mod stream; 27 + #[cfg(feature = "io")] 28 + pub mod io; 29 29 #[cfg(target_family = "unix")] 30 30 pub mod testing; 31 31 #[cfg(feature = "tokio")]
attic/src/stream.rs attic/src/io/mod.rs
+1 -1
justfile
··· 27 27 export RUST_MIN_STACK=16777216 28 28 29 29 pushd attic 30 - cargo build --target wasm32-unknown-unknown --no-default-features -F chunking -F stream 30 + cargo build --target wasm32-unknown-unknown --no-default-features -F chunking -F io 31 31 popd 32 32 pushd token 33 33 cargo build --target wasm32-unknown-unknown
+1 -1
server/Cargo.toml
··· 19 19 doc = false 20 20 21 21 [dependencies] 22 - attic = { path = "../attic", default-features = false, features = ["chunking", "stream", "tokio"] } 22 + attic = { path = "../attic", default-features = false, features = ["chunking", "io", "tokio"] } 23 23 attic-token = { path = "../token" } 24 24 25 25 anyhow = "1.0.98"
+1 -1
server/src/api/binary_cache.rs
··· 34 34 use attic::cache::CacheName; 35 35 use attic::mime; 36 36 use attic::nix_store::StorePathHash; 37 - use attic::stream::merge_chunks; 37 + use attic::io::merge_chunks; 38 38 39 39 /// Nix cache information. 40 40 ///
+1 -1
server/src/api/v1/upload_path.rs
··· 39 39 }; 40 40 use attic::chunking::chunk_stream; 41 41 use attic::hash::Hash; 42 - use attic::stream::{read_chunk_async, StreamHasher}; 42 + use attic::io::{read_chunk_async, StreamHasher}; 43 43 use attic::util::Finally; 44 44 45 45 use crate::database::entity::cache;
+1 -1
server/src/storage/s3.rs
··· 19 19 20 20 use super::{Download, RemoteFile, StorageBackend}; 21 21 use crate::error::{ErrorKind, ServerError, ServerResult}; 22 - use attic::stream::read_chunk_async; 22 + use attic::io::read_chunk_async; 23 23 use attic::util::Finally; 24 24 25 25 /// The chunk size for each part in a multipart upload.