Skip to content

Commit

Permalink
rust: Some doc and misc tweaks
Browse files Browse the repository at this point in the history
Prep for a first publishing of the crates.

Signed-off-by: Colin Walters <[email protected]>
  • Loading branch information
cgwalters committed May 30, 2024
1 parent 32b3f6e commit 689ccc6
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
2 changes: 1 addition & 1 deletion rust/composefs-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
5 changes: 2 additions & 3 deletions rust/composefs-core/src/fsverity.rs
Original file line number Diff line number Diff line change
@@ -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};

Expand Down
13 changes: 10 additions & 3 deletions rust/composefs-core/src/lib.rs
Original file line number Diff line number Diff line change
@@ -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)]
Expand All @@ -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>(f: File, mut callback: F) -> Result<()>
where
F: FnMut(&'_ Entry) -> Result<()>,
Expand Down

0 comments on commit 689ccc6

Please sign in to comment.