Expand description
The WeaveFFI API model: everything between an API definition and code generation.
irholds the in-memory IR types that an IDL document or annotated Rust source lowers to, andparsereads the IDL text formats (YAML, JSON, and TOML).rustextracts the IR from annotated Rust source; the proc-macros and the CLI share it.validatechecks a document and produces theResolvedApievery consumer works from.model,abi,plan,errors, andpkgbuild the canonical binding model, the C ABI lowering, the marshalling plan, the error mapping, and the package identity.checksumfingerprints each top-level module’s contract so a stale binding refuses to load.
§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 binding model, which is all the proc-macros need.
Re-exports§
pub use resolved::ResolvedApi;
Modules§
- abi
- The canonical WeaveFFI C ABI model.
- checksum
- Contract checksums: a stable fingerprint of a top-level module’s ABI.
- errors
- The shared error naming policy.
- ir
- In-memory intermediate representation: the data model a parsed WeaveFFI IDL document becomes.
- model
- The binding model: a normalized, fully-lowered view of a
ResolvedApithat every language backend consumes. - parse
- Multi-format IDL parsing: turn YAML, JSON, or TOML source text into an
Api. - pkg
- Package identity: the one source of every name a generated package uses.
- plan
- The marshalling plan: the language-neutral calling contracts every backend renders, stated once.
- resolved
- The resolved IR: a validated
Apipaired with the type index that turns its writtenTypeRefs into resolvedTys. - rust
- Extract a WeaveFFI
Apifrom annotated Rust source. - validate
- IDL validation. This module owns the
ValidationErrorcatalog and thevalidate_apientry point; the work is split across submodules:rules(per-module checks),diagnostic(miette span attachment), andwarnings(advisory lints).