Expand description
Library for cfsctl command line utility
This crate also re-exports all composefs-rs library crates, so downstream
consumers can take a single dependency on cfsctl instead of listing each
crate individually.
use composefs_ctl::composefs::repository::Repository;
use composefs_ctl::composefs::fsverity::Sha256HashValue;
let repo = Repository::<Sha256HashValue>::open_path(
rustix::fs::CWD,
"/nonexistent",
);
assert!(repo.is_err());Re-exportsΒ§
pub use composefs;pub use composefs_boot;pub use composefs_oci;
StructsΒ§
- App
- cfsctl
- FsRead
Options π - Common options for reading a filesystem from a path
- Fsck
Json πOutput - JSON output wrapper for
cfsctl fsck --json. - OCIConfig
Filesystem πOptions - Common options for operations using OCI config manifest streams that may transform the image rootfs
- OCIConfig
Options π - Common options for operations using OCI config manifest streams
- OciFsck
Json πOutput - JSON output wrapper for
cfsctl oci fsck --json.
EnumsΒ§
- Command π
- Hash
Type - The Hash algorithm used for FsVerity computation
- Local
Fetch πCli - CLI representation of [
composefs_oci::LocalFetchOpt]. - OciCommand π
- OciReference π
- A reference to an OCI image: either a content digest or a named ref.
FunctionsΒ§
- dump_
file_ πimpl - load_
filesystem_ πfrom_ oci_ image - load_
filesystem_ πfrom_ ondisk_ fs - open_
repo - Open a repo, auto-upgrading old-format repos unless
--no-upgradewas passed. - resolve_
hash_ πtype - Determine the effective hash type for a repository.
- resolve_
oci_ πconfig - Resolve an
OciReferenceto a config digest and optional verity. - resolve_
oci_ πimage - Resolve an
OciReferenceto an [OciImage]. - resolve_
repo_ πpath - Resolve the repository path from CLI args without opening it.
- run_app
- Top-level dispatch: handle init specially, otherwise open repo and run.
- run_
cmd_ with_ repo - Run with cmd
- run_
cmd_ without_ repo - Run commands that donβt require a repository.
- run_
from_ iter - Acts as a proxy for the
cfsctlCLI by executing the CLI logic programmatically - run_
init π - Handle
cfsctl init - verity_
opt π