Skip to main content

bynk_check/
lib.rs

1//! Bynk's semantic-analysis layer — the crate between `bynk-syntax` and the
2//! emitter.
3//!
4//! Holds name resolution (`resolver`), type checking (`checker`), the registries
5//! the checker dispatches and the LSP reads (`kernel_methods`, `builtin_names`),
6//! the first-party embedded sources (`firstparty`), actor analysis (`actors`),
7//! and the **captured analysis tables** written during resolution/checking:
8//! the binding `index`, inlay `hints`, `expr_types`, and `locals`. These tables
9//! are produced here and *queried* by the IDE layer (`bynk-ide`, a later slice):
10//! captured tables live in `bynk-check`, queries live above it (ADR 0102, and
11//! the crate-decomposition track's check↔IDE seam).
12//!
13//! Extracted from the old `bynkc` crate as slice 3 of the crate-decomposition
14//! track. Behaviour is unchanged; the emitter and project layers above depend on
15//! this crate directly.
16//!
17//! P4.1 (#1115) added this crate's first project-level orchestration:
18//! `project_model` (discovery→parse→group→resolve, shared with `bynk-emit`'s
19//! `run_checks`), `check_pipeline` (the per-file resolve+check core, also
20//! shared), and `analysis` (`ProjectAnalysis` and the new
21//! `analyse_project` entry point `bynk-ide` will call once P4.2 repoints it).
22//! `context_checks` — the per-file context/capability/provider/service/agent
23//! validation, previously `bynk-emit`'s `validate.rs` — moved here in the
24//! same slice, for the same reason: `project_model`'s and `check_pipeline`'s
25//! shared pipeline needs it, and duplicating it into a second copy is exactly
26//! what this crate's extraction discipline exists to avoid.
27
28// The README's `rust` examples are compiled (and, unless marked `no_run`, run)
29// as doctests, so they cannot rot (#1645). `cfg(doctest)` keeps this item out of
30// every build and out of the docs.rs front page, which the `//!` docs above own.
31#[cfg(doctest)]
32#[doc = include_str!("../README.md")]
33struct ReadmeDoctests;
34
35pub mod actors;
36pub mod agent_state;
37pub mod analysis;
38pub mod annotation_consts;
39pub mod architecture_facts;
40pub mod assets;
41pub mod ast_text;
42pub mod builtin_names;
43#[cfg(test)]
44mod callee_tests;
45pub mod caller_admission;
46pub mod capability_paths;
47pub mod check_pipeline;
48pub mod checker;
49pub mod consts;
50pub mod containers;
51pub mod context_checks;
52pub mod contract;
53pub mod contract_compat;
54pub mod d1_migrations;
55pub mod d1_sql;
56pub mod email;
57pub mod embeds;
58pub mod emitted_names;
59pub mod entailment;
60pub mod exec_plan;
61pub mod exports;
62pub mod expr_types;
63pub mod firstparty;
64pub mod fixtures;
65pub mod group_triggers;
66pub mod hints;
67pub mod icu;
68pub mod index;
69pub mod kernel_methods;
70pub mod kernel_op;
71pub mod locals;
72pub mod memo;
73pub mod mysql_sql;
74pub mod narrowing;
75pub mod oracle;
76pub mod packages;
77pub mod pg_sql;
78pub mod phase_timing;
79pub mod project_model;
80pub mod queue_consumers;
81pub mod recovery;
82pub mod requirements;
83pub mod resolver;
84pub mod schema_registry;
85#[cfg(test)]
86mod scope_tests;
87pub mod secrets;
88pub mod shadow_uses;
89pub mod stability;
90pub mod store_ops;
91pub mod store_write;
92pub mod symbols;
93pub mod test_env;
94pub mod test_suites;
95#[cfg(test)]
96pub(crate) mod testkit;
97pub mod unit_signature;
98pub mod websocket;
99pub mod wire;
100pub mod wire_default;
101pub mod wire_format;
102pub mod worker_bindings;
103pub mod worker_groups;
104
105pub use firstparty::Platform;