jacquard_lexgen/
lib.rs

1//! # Lexicon fetching and code generation binaries for Jacquard
2//!
3//! This crate provides the tooling for fetching lexicon schemas from various sources
4//! and generating Rust code from them.
5//!
6//! ## Binaries
7//!
8//! ### lex-fetch
9//!
10//! Downloads lexicons from configured sources and runs the code generation pipeline:
11//!
12//! ```bash
13//! cargo run -p jacquard-lexgen --bin lex-fetch
14//! ```
15//!
16//! Configuration lives in `lexicons.kdl` at the workspace root.
17//!
18//! ### jacquard-codegen
19//!
20//! Runs code generation on a local directory of lexicons:
21//!
22//! ```bash
23//! cargo run -p jacquard-lexgen --bin jacquard-codegen -- \
24//!     -i ./lexicons \
25//!     -o ./crates/jacquard-api/src
26//! ```
27//!
28//! ## Modules
29//!
30//! - [`fetch`] - Ingests lexicons from git, atproto, http fetch, and other sources
31//! - [`cli`] - CLI argument parsing utilities
32//! - [`schema_extraction`] - Extract lexicon schemas from Rust types via inventory (link-time discovery)
33//! - [`schema_discovery`] - Discover schemas by scanning workspace source files (no linking required)
34
35pub mod cli;
36pub mod fetch;
37pub mod schema_discovery;
38pub mod schema_extraction;
39
40pub use fetch::{Config, Fetcher};