wayfinder_core/lib.rs
1//! wayfinder-core.
2//!
3//! The engine behind the `wf` CLI: a client, cache, search layer, and renderer
4//! for [Archives of Nethys](https://2e.aonprd.com) Pathfinder 2e and Starfinder
5//! 2e game data. It talks to AON's Elasticsearch backend, caches documents in a
6//! local SQLite store with TTLs, and turns AON's HTML/markdown into structured
7//! content blocks that consumers can render however they like.
8//!
9//! The four modules mirror that flow:
10//!
11//! - [`aon`] -- the Elasticsearch [`client`](aon::client), the
12//! [`query`](aon::query) builder, the document [`models`](aon::models), and
13//! the known [`categories`](aon::categories) with their filterable fields.
14//! - [`cache`] -- a SQLite-backed [`CacheStore`](cache::store::CacheStore) with
15//! per-category TTLs.
16//! - [`search`] -- the unified [`SearchService`](search::SearchService) that
17//! merges cache and live client, plus legacy/remaster handling.
18//! - [`render`] -- AON HTML/markdown into [`ContentBlock`](render::ContentBlock)s
19//! and `Span`s; colorization is opt-in so non-terminal consumers stay clean.
20//!
21//! TLS uses rustls with the ring provider; [`AonClient::new`](aon::AonClient::new)
22//! installs it, so there is no dependency on OpenSSL or aws-lc.
23
24pub mod aon;
25pub mod cache;
26pub mod error;
27pub mod render;
28pub mod search;
29
30pub use error::{Error, Result};