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;
ModulesΒ§
- composefs_
info - composefs-info - Query information from composefs images.
- mkcomposefs
- mkcomposefs - Create composefs images from directories or dumpfiles.
- varlink
- Varlink RPC service exposing repository operations over a Unix socket.
Varlink RPC service for
cfsctl.
StructsΒ§
- App
- cfsctl
- FsRead
Options π - Common options for reading a filesystem from a path
- Indicatif
Reporter π - An
indicatif-backed [ProgressReporter] for use in the CLI. - 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
EnumsΒ§
- Command π
- Erofs
Version - The EROFS format version used when generating images.
- 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.
- Ostree
Command π
FunctionsΒ§
- default_
repo_ πpath - Resolve the default repository path based on the effective uid.
- dump_
file_ πimpl - get_
mount_ πoptions - load_
filesystem_ πfrom_ oci_ image - load_
filesystem_ πfrom_ ondisk_ fs - open_
repo - Open a repo, auto-upgrading old-format repos unless
--no-upgradewas passed. - open_
repo_ πat - Open a repo at an explicit path, auto-upgrading old-format repos unless
no_upgradeis set. - 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_
if_ socket_ activated - If the process was started bare via systemd socket activation, serve the
varlink API on the activated socket and return
Ok(true). Otherwise returnOk(false)so the caller falls through to normal CLI parsing. - run_
init π - Handle
cfsctl init - verity_
opt π