cooklang-find 0.6.1

Library for finding and managing Cooklang recipes in the filesystem
Documentation
//! # cooklang-find
//!
//! A library for finding, searching, and organizing Cooklang recipe files.
//!
//! This library provides utilities for working with .cook and .menu files,
//! including:
//! - Loading recipes from files or content
//! - Searching recipes by name and content
//! - Building hierarchical directory trees of recipes
//! - Extracting and working with recipe metadata
//!
//! ## Quick Start
//!
//! ```no_run
//! use cooklang_find::{get_recipe, search, build_tree};
//! use camino::Utf8Path;
//!
//! // Load a specific recipe
//! let recipe = get_recipe(vec!["./recipes"], "pancakes")?;
//!
//! // Search for recipes
//! let results = search(Utf8Path::new("./recipes"), "chocolate")?;
//!
//! // Build a directory tree
//! let tree = build_tree("./recipes")?;
//! # Ok::<(), Box<dyn std::error::Error>>(())
//! ```
//!
//! ## UniFFI Support
//!
//! This library includes UniFFI bindings for use on iOS and Android, behind the
//! `ffi` feature. It is enabled by default, so the mobile bindings build
//! unchanged; the `ffi` module provides simplified, FFI-safe types and functions.
//!
//! Rust-only consumers should depend on this crate with `default-features = false`
//! to avoid compiling uniffi and its bindgen chain.

// UniFFI scaffolding - must be at crate root
#[cfg(feature = "ffi")]
uniffi::setup_scaffolding!();

/// Recipe fetching utilities for loading recipes by name.
pub mod fetcher;

/// UniFFI bindings for cross-platform support (iOS, Android).
#[cfg(feature = "ffi")]
pub mod ffi;

/// Menu discovery by date (sections containing a date string).
pub mod menu;

/// Core data models for recipes and metadata.
pub mod model;

/// Recipe searching functionality.
pub mod search;

/// Recipe tree building for directory hierarchies.
pub mod tree;

pub use fetcher::{get_recipe, get_recipe_str};
pub use menu::list_menus_for_date;
pub use model::*;
pub use search::search;
pub use tree::{build_tree, RecipeTree};