1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
//! The WeaveFFI API model: everything between an API definition and code
//! generation.
//!
//! * [`ir`] holds the in-memory IR types that an IDL document or annotated
//! Rust source lowers to, and [`parse`] reads the IDL text formats (YAML,
//! JSON, and TOML).
//! * [`rust`] extracts the IR from annotated Rust source for the
//! proc-macros.
//! * [`validate`] checks a document against the library's
//! [`Identity`](pkg::Identity) and builds the one [`Model`](model::Model)
//! every generator consumes.
//! * [`ty`], [`model`], [`abi`], [`plan`], [`errors`], and [`pkg`] hold the
//! resolved types and type index, the model with every C symbol and ABI
//! signature, the C ABI lowering, the marshalling plan, the error naming
//! policy, and the package identity.
//! * [`contract`] computes each top-level module's contract table, one
//! fingerprint per declaration, so a stale binding refuses to load and
//! names what changed.
//! * [`meta`] is the library metadata: the frames the macro embeds in a
//! producer's library and the CLI reads back into an [`Api`](ir::Api).
//!
//! # Features
//!
//! * `idl` (default): the IDL text formats, JSON Schema derivation for the IR
//! types, and fancy miette diagnostics. Without it the crate still provides
//! the IR types, Rust extraction, validation, and the model, which is all
//! the proc-macros need.
// A few docs link to IDL-only items (the `parse` module, miette's
// `Diagnostic`); those links only resolve with the `idl` feature.