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 legacy;
23mod manifest;
24mod model;
25mod overlay;
26mod project;
27mod store;
28mod toml_lite;
29
30pub use digest::{audio_digest, fnv1a64, fnv1a64_hex, frame_digest};
31pub use embed::{EmbeddedDir, recipes_from_embedded};
32pub use embed_codegen::{generate_embed_code, write_embed};
33pub use manifest::{
34    BookManifest, ChapterManifest, DEFAULT_ORDER, Diagnostic, RecipeManifest, lint_dir,
35    lint_dir_strict_no_quote, parse_book, parse_chapter, parse_recipe,
36};
37pub use model::{
38    BookView, ChapterView, CheckResult, CookbookView, Expectation, FamilyView, GroupedView,
39    LibView, RecipeCard, RecipeRun, RecipeSource,
40};
41pub use overlay::{OverlayDirectives, apply_directives, load_overlay, parse_overlay};
42pub use project::{family_of, grouped_view, lib_view, next, ordered_cards, search, view};
43pub use store::RecipeStore;
44pub use toml_lite::TomlValue;