Skip to main content

sim_cookbook/
lib.rs

1//! Cookbook engine for SIM's crate-local tutorial recipes.
2//!
3//! A *recipe* is a tiny lesson -- a setup file in a registered codec plus a
4//! purpose document -- that ships inside the crate it teaches.
5//! When a lib loads, it registers its recipes as Card records; the *cookbook*
6//! is then a projection over those cards, grouped into books and chapters and
7//! rendered by every surface (CLI, WebUI, browse, agent).
8//!
9//! This crate owns the kernel-free cookbook engine: manifest parsing and lint,
10//! compile-time embedding, recipe stores, projection/search/next behavior, and
11//! deterministic user overlays. Runtime operations live in `sim-lib-cookbook`;
12//! the CLI, WebUI, browse/help, and agent surfaces all use that shared runtime
13//! projection instead of parallel cookbook logic.
14
15#![forbid(unsafe_code)]
16#![deny(missing_docs)]
17
18pub mod config;
19mod digest;
20mod embed;
21mod embed_codegen;
22mod manifest;
23mod model;
24mod overlay;
25mod project;
26mod store;
27mod toml_lite;
28
29pub use digest::{audio_digest, fnv1a64, fnv1a64_hex, frame_digest};
30pub use embed::{EmbeddedDir, recipes_from_embedded};
31pub use embed_codegen::{generate_embed_code, write_embed};
32pub use manifest::{
33    BookManifest, ChapterManifest, DEFAULT_ORDER, Diagnostic, RecipeManifest, lint_dir,
34    lint_dir_strict_no_quote, parse_book, parse_chapter, parse_recipe,
35};
36pub use model::{
37    BookView, ChapterView, CheckResult, CookbookView, Expectation, FamilyView, GroupedView,
38    LibView, RecipeCard, RecipeRun, RecipeSource,
39};
40pub use overlay::{OverlayDirectives, apply_directives, load_overlay, parse_overlay};
41pub use project::{family_of, grouped_view, lib_view, next, ordered_cards, search, view};
42pub use store::RecipeStore;
43pub use toml_lite::TomlValue;