prebindgen_flat/lib.rs
1//! # prebindgen-flat
2//!
3//! The flat model prebindgen's registry pipeline is built over.
4//!
5//! [`flat::Flat::builder`] parses `(syn::Item, [`SourceLocation`](prebindgen::SourceLocation))`
6//! records — read through [`prebindgen::Source`] — into one flat
7//! namespace — the language-agnostic index of everything a `#[prebindgen]`
8//! source crate declared. The Registry-based pipeline that resolves a binding
9//! over this model — type conversion, boundary expansion, Rust emission —
10//! ships in the separate
11//! [`prebindgen-registry`](https://docs.rs/prebindgen-registry) crate, which
12//! re-exports this crate's modules (`flat`, `shape`, `types_util`) at its own
13//! root so a language adapter names one crate for the whole pipeline.
14//!
15//! Secondary artifacts such as C headers or Kotlin sources are produced by the
16//! language adapter after the Rust registry is resolved; see the separate
17//! `prebindgen-c` and `prebindgen-jni` crates.
18
19/// The capability to render captured Rust syntax — handed to an adapter's
20/// emission callbacks and nowhere else, so code that decides cannot reach
21/// what code that emits must spell. An out-of-crate adapter implements
22/// `Prebindgen` (in the separate `prebindgen-registry` crate) and
23/// therefore has to name this type.
24pub use crate::flat::emit::Emit;
25pub mod flat;
26pub mod shape;
27pub mod types_util;
28
29pub use self::flat::{Element, Flat, TypeKey, TypeKeyParseError};