Skip to main content

Module library

Module library 

Source
Expand description

Pure logic for zenith library list, zenith library show, and zenith library add.

The registry/resolver lives in crate::library; this module turns a resolved set of packs into stdout text (list), inspects individual items (show), and materializes library items into target documents (add). None of these functions touch the filesystem — the dispatcher reads/writes files and calls crate::library::resolve_packs.

Submodules:

  • listzenith library list
  • showzenith library show
  • addzenith library add

Structs§

AddCmdErr
Error produced by the library add command.
AddResult
The successful outcome of library add: the canonical formatted source to write back (or print on --dry-run) plus a human-readable summary.
ShowCmdErr
Error produced by the library show command.

Functions§

add
Materialize the library item named by spec into the document target_src, returning the formatted result + a summary.
list
Render the resolved packs for library list.
show
Inspect the library item named by spec (<package>#<item>) and return (stdout_text, exit_code).