diff --git a/rust/composefs-core/Cargo.toml b/rust/composefs-core/Cargo.toml index e11b0696..ff881d2c 100644 --- a/rust/composefs-core/Cargo.toml +++ b/rust/composefs-core/Cargo.toml @@ -25,7 +25,7 @@ v1_0_4 = ["composefs-sys/v1_0_4"] [dependencies] anyhow = "1.0" libc = "0.2" -composefs-sys = { path = "../composefs-sys" } +composefs-sys = { version = "0.1.0", path = "../composefs-sys" } [dev-dependencies] tar = "0.4.38" diff --git a/rust/composefs-core/src/fsverity.rs b/rust/composefs-core/src/fsverity.rs index ac296954..c5beb20a 100644 --- a/rust/composefs-core/src/fsverity.rs +++ b/rust/composefs-core/src/fsverity.rs @@ -1,7 +1,6 @@ -//! # Bindings for computing fsverity +//! # Bindings for fsverity //! -//! This collection of APIs is for computing fsverity digests as -//! used by composefs. +//! This collection of APIs is for fsverity as used by composefs. use std::os::fd::{AsRawFd, BorrowedFd}; diff --git a/rust/composefs-core/src/lib.rs b/rust/composefs-core/src/lib.rs index 3e3ccf54..0aa1c72f 100644 --- a/rust/composefs-core/src/lib.rs +++ b/rust/composefs-core/src/lib.rs @@ -1,7 +1,11 @@ //! # Rust composefs library //! -//! This crate builds on top of the core composefs tooling, adding a Rust -//! API especially oriented around OCI container images. +//! This crate builds on top of the core composefs tooling; it currently requires +//! both the `libcomposefs` C library as well as the external executables +//! `mkcomposefs` and `composefs-info`. +//! +//! The core functionality exposed at the moment is just support for creating +//! and parsing composefs "superblock" entries. // See https://doc.rust-lang.org/rustc/lints/listing/allowed-by-default.html #![deny(missing_docs)] @@ -25,7 +29,10 @@ pub mod mkcomposefs; pub mod fsverity; -/// Parse a composefs superblock. +/// Parse a composefs superblock. The provided callback will be invoked +/// for each entry in the target image, containing exactly one parsed entry. +/// +/// This function depends on an external `composefs-info` binary currently. pub fn dump(f: File, mut callback: F) -> Result<()> where F: FnMut(&'_ Entry) -> Result<()>,