tools tier

tools-book

Assembles docs/reference/library-crates-by-layer.md into a paginated PDF book (title page, notice, about-the-author, introduction, table of contents, dependency chart, chapters by layer). Pure section/graph/template logic is tested; rendering shells pandoc/mermaid-render/typst with strict argument vectors (Gate 1.5.6) -- no shell interpreter.

Assembles docs/reference/library-crates-by-layer.md into a paginated PDF book (title page, notice, about-the-author, introduction, table of contents, dependency chart, chapters by layer). Pure section/graph/template logic is tested; rendering shells pandoc/mermaid-render/typst with strict argument vectors (Gate 1.5.6) -- no shell interpreter.

Tiertools
Roleunclassified (baselined)
Pathcrates/tools/book
Edition2021
Targetstools-book, tools_book
Public items9 across 0 modules
Tests10

What it is for

Pure logic for assembling docs/reference/library-crates-by-layer.md into a book: section parsing, dependency-graph extraction, heading-level promotion, and template placeholder substitution. All I/O (reading the manual, shelling to pandoc/tools-mermaid-render/typst) lives in main.rs.

Capabilities

crate root

Pure logic for assembling docs/reference/library-crates-by-layer.md into a

Item
fn substitute_placeholders(content : & str, year : & str, date : & str, commit : & str, crate_count : usize,) -> String
fn typst_escape(s : & str) -> String

CrateSection

Pure logic for assembling docs/reference/library-crates-by-layer.md into a

Item
pub struct CrateSection
fn parse_manual_sections(manual : & str) -> Vec <CrateSection>
fn build_dependency_mermaid(sections : & CrateSection) -> String
fn build_layer_grid_typst(sections : & CrateSection) -> String

LexiconEntry

Pure logic for assembling docs/reference/library-crates-by-layer.md into a

Item
pub struct LexiconEntry
fn parse_lexicon(tsv : & str) -> Vec <LexiconEntry>
fn render_lexicon_typst(entries : & LexiconEntry) -> String

How to use it

No examples/ target and no doctest in this crate's rustdoc. The tests listed under Verification are the closest executable usage.

Module structure

No public modules: the crate root is its whole surface.

Public surface

`crate root`

ItemWhat it is
pub struct CrateSectionOne crate's chapter section, as parsed out of the generated manual.
fn parse_manual_sections(manual : & str) -> Vec <CrateSection>Parse docs/reference/library-crates-by-layer.md's body into per-crate sections, in source order (already layer-dependency-ordered, then alphabetical within a layer, by construction — see tools-gen-ai-context's render_library_crates_by_layer_md)
fn substitute_placeholders(content : & str, year : & str, date : & str, commit : & str, crate_count : usize,) -> StringReplace {{YEAR}} / {{DATE}} / {{COMMIT}} / {{CRATE_COUNT}} placeholders
fn build_dependency_mermaid(sections : & CrateSection) -> StringBuild a Mermaid flowchart LR of dependencies between layers, not individual crates
fn build_layer_grid_typst(sections : & CrateSection) -> StringBuild the front-matter "Crates by Layer" grid: a Typst table per layer, crate names wrapped as a comma-joined list
fn typst_escape(s : & str) -> StringEscape Typst's markup-special characters (#, *, _, , <, >, @`) in plain text that is not itself meant to be Typst markup — layer names are safe today (lowercase ascii words) but this is cheap insurance against a future layer name that isn't.
pub struct LexiconEntryOne row of docs/reference/lexicon-policy.tsv: a flagged term, its preferred replacement(s), and the reasoning
fn parse_lexicon(tsv : & str) -> Vec <LexiconEntry>Parse the real lexicon TSV (term\tpreferred\tscope\tfloor\treasoning), skipping #-comment and blank lines
fn render_lexicon_typst(entries : & LexiconEntry) -> StringRender the lexicon as a three-column Typst table (Term / Say Instead / Why) for the appendix.

No pub use re-exports: every item above is declared in this crate.

Boundary

Depends on no other workspace tier.

Shares tier tools with 84 other crates: tools-advisory-reach, tools-archive-guard, tools-artifact-scaffold, tools-ask-ai-core, tools-ask-ais, tools-ask-gemini, tools-book-report, tools-boundary-scan, … (84 total).

_What this crate deliberately does NOT own is a judgment. No committed registry records one for it, so none is stated here._

Where it sits

Tier (ontology)tools
Architectural role (taxonomy)unclassified (baselined)
Locationcrates/tools/book
Vocabulary in force (lexicon)current

Dependencies

Runtime, from outside the workspace.

CrateRequirementFeaturesOptionalOnly on
anyhow^1noalways
chrono^0.4serdenoalways
clap^4derivenoalways

Development, in this workspace.

CrateTierOptionalOnly on
`tools-cli-conformance`toolsnoalways

Build. None.

Depended on by. Nothing in this workspace.

Signal flow — what reaches this crate, and what it reaches.

flowchart LR
  SELF["tools-book"]
  SELF -->|development| n_tools_cli_conformance["tools-cli-conformance"]
  classDef self fill:#1f883d,stroke:#1f883d,color:#fff;
  class SELF self;

Feature flags

No Cargo features are defined: every capability is unconditional, so no consumer can receive a half-wired crate.

Targets

KindNameSource
bintools-book`src/main.rs`
libtools_book`src/lib.rs`

Error model

No public error type was detected: no public item declares a type named *Error, and no public signature returns one.

Operational characteristics

PropertyEvidence
async public surfacenone detected
async runtimenone detected
database accessnone detected
network I/Onone detected
unsafe codenone detected
environment variablesyes

No unsafe block, unsafe fn, unsafe impl or unsafe trait was found by the parser anywhere in this crate's source.

Configuration

VariableRead in
MERMAID_MMDCsrc/main.rs
MERMAID_PUPPETEER_CONFIGsrc/main.rs

No workspace crate depends on this one.

Verification

KindCount
Unit tests10
Integration tests0
Examples0
Doctests0

Evidence by module. How often each public module is named by something executable.

ModuleTestsExamplesConsumers
crate root900

What the tests establish, by name:

Documentation coverage

MeasureDocumentedTotal
Public items with rustdoc99
Public modules with a //! block00
pie showData
    title Public items with rustdoc
    "Documented" : 9
    "No rustdoc detected" : 0

Metrics

MetricValue
Rust source files2
Source lines931
Code lines665
Public API items9
Public modules0
Tests10
Examples0
Cargo features0
Direct runtime dependencies3
Workspace reverse dependencies0
pie showData
    title Public API by kind
    "function" : 7
    "struct" : 2
pie showData
    title Rust source composition
    "Code" : 665
    "Blank or comment" : 266

Generation

Rendered by tools-corpus corpus readme from repository evidence alone, renderer schema 2, lexicon current. No model, network service or database was consulted. Regenerate with tools-corpus corpus readme --write; verify with --check.

All tools · Manual