Expand description
bynk-model: the Bynk system model. It is the resolved description of
what a Bynk program is at the level of declarations: service protocols,
handler kinds and routes, type shapes, store fields, capability and
attached-fn signatures, given references, actor seams and event
subscriptions. Every tool that needs those facts reads them here, not from
the AST.
This is distinct from bynk_check::project_model, which models units and
manifests, not declarations.
The model sits above bynk-check (crate-hygiene B4, #3012). Its boundary
half, bynk_check::wire::WireModel, stays in bynk-check because the
checker’s own boundary checks read it.
Three modules, all re-exported at the root:
vocabulary: the model’s items (until crate-hygiene B1, #2939, thebynk-ircrate).lower: the builder from a checked program to those items (until B1, thebynk-lowercrate).entry: the entry handlers’ signatures, described structurally for a host such as the playground (until crate-hygiene B3, #2999,bynk_check::entry_signature).
The system-model ADR (crate-hygiene track §6, design/archive/retired-tracks.md)
records the scope, the requirements every item is held to (M-1 one source
per fact, M-2 total over certified programs, M-3 a reader outside the model,
M-4 no new AST embedding) and what the model is not: not an expression IR,
not the emit ABI, and not a second checker.
Re-exports§
pub use entry::*;pub use lower::*;pub use vocabulary::*;
Modules§
- entry
- #2695: the signatures of a unit’s entry handlers - every
on call(...)of aservice- described structurally from the checker’s resolved types, so a host (the playground’s Arguments row) never re-parses the source to learn what a run can be passed. - lower
bynk_model::lower(thebynk-lowercrate until crate-hygiene B1, #2939): the model’s builder, the AST-analysis helpersbynk-emitreads resolved declaration-level facts through — handler kinds andgivenclauses, service protocols, store-field shapes, capability op and attached-method signatures, route cache/limit annotations, event-subscriber shapes, and the store-write walk behindemit_agent’s implicit-commit decision. Each takes a checked program (or itsTypedCommons) and a syntax-tree node and returns acrate::vocabularyvalue; none lowers an expression body.- vocabulary
bynk_model::vocabulary(thebynk-ircrate until crate-hygiene B1, #2939): the resolved declaration-level vocabulary the model’s readers (the emitter, the editor’s analysis, the CLIs) get through the builder,crate::lower, instead of re-deriving the same facts frombynk_syntax::asta second time.