ruprizzle_core/lib.rs
1//! Shared foundations for the ruprizzle ORM.
2//!
3//! This crate defines the [`ir::Schema`] type — the single contract that the
4//! parser produces and that codegen, the dialects, and the migration engine all
5//! consume — plus the spans and diagnostics that let any stage of the pipeline
6//! point back at the user's source.
7//!
8//! It has no database dependencies and does no I/O, which keeps it cheap to
9//! depend on and trivial to test.
10//!
11//! # Layout
12//!
13//! - [`ir`] — the intermediate representation
14//! - [`names`] — newtypes distinguishing model, field, and enum names
15//! - [`span`] — byte-offset source locations
16//! - [`diagnostic`] — accumulating, span-carrying schema errors
17//! - [`suggest`] — "did you mean…?" support for those errors
18
19#![forbid(unsafe_code)]
20#![warn(missing_docs, clippy::pedantic)]
21#![allow(clippy::module_name_repetitions)]
22
23pub mod diagnostic;
24pub mod ir;
25pub mod names;
26pub mod span;
27pub mod suggest;
28
29pub use diagnostic::{Diagnostics, SchemaError, SchemaErrors};
30pub use ir::{Provider, Schema};
31pub use names::{EnumName, FieldName, ModelName};
32pub use span::Span;