crab_r/lib.rs
1// Author: spicyzhug@gmail.com
2// Copyright: lituus-io, all rights reserved
3//
4//! # crab-r
5//!
6//! Generative technical metadata for BigQuery: name a project, a dataset, a
7//! table, or hand over SQL, and [`describe`] writes column and table
8//! descriptions from the catalog, the producing queries, lineage and the
9//! values themselves — each checked against the data before it is trusted.
10//!
11//! | Module | Role |
12//! |---|---|
13//! | [`base`] | Keys, typed arenas, JSON scanner/writer, batches, dates, budgets |
14//! | [`sql`] | GoogleSQL lexer, parser and emitter |
15//! | [`ir`] | Binder, diagnostics, column lineage and row conditions |
16//! | [`catalog`] | Zero-copy catalog image, INFORMATION_SCHEMA sync, value profiles |
17//! | [`exec`] | Warehouse trait; BigQuery client with dry-run cost guards |
18//! | [`lineage`] | Column lineage graph; Dataplex lineage client |
19//! | [`llm`] | Model trait; Vertex AI, OpenAI-compatible and replay backends |
20//! | [`describe`] | Describe: discovery, tracing, drafting, checks, judging, state |
21//! | [`engine`], [`prompt`], [`link`], [`values`], [`grammar`], [`verify`], [`eval`] | Text-to-SQL |
22//!
23//! Features: `http` (authorised HTTPS transport), `vertex`, `openai`,
24//! `dataplex`, and `cli` (the `crab-describe` command and [`describe::app`]).
25//! Futures are named (GATs and `impl Trait` in associated types), so the
26//! crate builds on the pinned nightly toolchain in `rust-toolchain.toml`.
27
28#![feature(impl_trait_in_assoc_type)]
29#![feature(future_join)]
30#![forbid(unsafe_code)]
31
32pub mod base;
33pub mod catalog;
34pub mod describe;
35pub mod engine;
36pub mod eval;
37pub mod exec;
38pub mod grammar;
39pub mod ir;
40pub mod lineage;
41pub mod link;
42pub mod llm;
43pub mod prompt;
44pub mod sql;
45pub mod values;
46pub mod verify;