Skip to main content

bynk_emit/emitter/
emit.rs

1//! Per-declaration emission — the functions `emit_project` drives to render each top-level Bynk
2//! declaration into TypeScript. Split out of `emitter.rs` (ADR 0060), then into one file per
3//! declaration kind (back-half paydown 2.1, #4086). This file only declares those files and
4//! re-exports them, so every `emitter::emit::X` and `emitter::X` path still resolves; each child
5//! imports what it uses explicitly. The one glob import below is not for this file: moved function
6//! bodies spell parent paths through it, such as `super::tco::plan`, `super::commons_alias`,
7//! `super::serialisation::…` and `super::ty_to_type_ref`.
8//!
9//! - `types`: type, refined, record and sum declarations and their checks;
10//! - `functions`: attached methods, free functions, constants and contract guards;
11//! - `suite`: the declarations a test suite makes, which `testgen` calls;
12//! - `handlers`: handler method names and labels, and the handler-body items services, agents and
13//!   free functions share;
14//! - `messages`: `messages` bundles and ICU placeholders;
15//! - `capability`: capabilities, derived capabilities and providers;
16//! - `service`: services, contexts, the `make` surface and the actor-sum types;
17//! - `websocket`: the Durable Object methods and `fetch` upgrade branch of a `from websocket`
18//!   service;
19//! - `agent`: `emit_agent`, the agent class's constructor, its state record and its zero entries;
20//! - `agent_store`: an agent's store layout, lazy-read specs, and key and wire codecs;
21//! - `agent_state`: the `loadState` and `commitState` functions, hydration and the persistence
22//!   guards;
23//! - `agent_migrate`: the `migrate from N` step functions and their dispatcher;
24//! - `agent_dispatch`: an agent's handler methods, Workers `fetch` dispatch and factory;
25//! - `agent_history`: the history-property driver.
26
27use super::*;
28
29mod agent;
30mod agent_dispatch;
31mod agent_history;
32mod agent_migrate;
33mod agent_state;
34mod agent_store;
35mod capability;
36mod functions;
37mod handlers;
38mod messages;
39mod service;
40mod suite;
41mod types;
42mod websocket;
43
44pub(crate) use agent::*;
45use agent_dispatch::*;
46use agent_history::*;
47use agent_migrate::*;
48use agent_state::*;
49pub(crate) use agent_store::*;
50pub(crate) use capability::*;
51pub(crate) use functions::*;
52pub use handlers::*;
53pub(crate) use messages::*;
54pub use service::*;
55pub use suite::*;
56pub(crate) use types::*;
57pub(crate) use websocket::*;