Skip to content

Commit 9469b58

Browse files
committed
composefs-oci: add support for splitfdstream
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
1 parent 5c7e9ee commit 9469b58

3 files changed

Lines changed: 384 additions & 2 deletions

File tree

crates/composefs-oci/Cargo.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,14 @@ fn-error-context = "0.2"
1616
async-compression = { version = "0.4.0", default-features = false, features = ["tokio", "zstd", "gzip"] }
1717
bytes = { version = "1", default-features = false }
1818
composefs = { workspace = true }
19+
splitfdstream = { workspace = true }
1920
containers-image-proxy = { version = "0.9.2", default-features = false }
21+
libc = "0.2"
2022
hex = { version = "0.4.0", default-features = false }
2123
indicatif = { version = "0.17.0", default-features = false, features = ["tokio"] }
2224
oci-spec = { version = "0.8.0", default-features = false }
23-
rustix = { version = "1.0.0", features = ["fs"] }
25+
rustix = { version = "1.0.0", features = ["fs", "net"] }
26+
serde_json = { version = "1.0", default-features = false, features = ["std"] }
2427
sha2 = { version = "0.10.1", default-features = false }
2528
tar = { version = "0.4.38", default-features = false }
2629
tokio = { version = "1.24.2", features = ["rt-multi-thread"] }

crates/composefs-oci/src/lib.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,11 @@
1212
1313
pub mod image;
1414
pub mod skopeo;
15+
pub mod splitfdstream;
1516
pub mod tar;
1617

18+
pub use splitfdstream::import_from_splitfdstream;
19+
1720
use std::{collections::HashMap, io::Read, sync::Arc};
1821

1922
use anyhow::{bail, ensure, Context, Result};
@@ -28,7 +31,7 @@ use crate::tar::get_entry;
2831

2932
type ContentAndVerity<ObjectID> = (String, ObjectID);
3033

31-
fn layer_identifier(diff_id: &str) -> String {
34+
pub(crate) fn layer_identifier(diff_id: &str) -> String {
3235
format!("oci-layer-{diff_id}")
3336
}
3437

0 commit comments

Comments
 (0)