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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
// Copyright (c) 2026 Cameron Bytheway
// SPDX-License-Identifier: MIT
//! Self-populating registry of every event type compiled into the binary.
//!
//! The dumper must embed a schema for every event id that can appear in the rings, but the
//! producer should not have to enumerate its event types by hand — that list would drift the moment
//! someone adds an event. Instead `#[derive(Event)]` emits an [`inventory::submit!`] of a
//! [`Registration`] for each type, and `inventory` gathers them into a distributed slice the linker
//! assembles. [`schemas`] walks that slice, so the registry is always exactly the set of events the
//! binary can actually produce.
//!
//! This is `std`-only: `inventory`'s collection relies on life-before-main constructors that a bare
//! `no_std` target does not provide. Events can still be *defined* in `no_std` crates; they are
//! only auto-registered once linked into a `std` binary that records them.
use crateEventSchema;
/// One event type's registration in the global inventory. The derive submits one of these per
/// `#[derive(Event)]` type; [`schemas`] reads them back.
collect!;
/// Every registered event schema, in unspecified order. This is the set the dumper embeds.
/// The number of registered event types.
/// One registered set of query DDL — opaque SQL text (typically DuckDB `CREATE VIEW`/`CREATE MACRO`
/// statements) describing how to query this binary's events. A consumer submits one via
/// [`register_views!`](crate::register_views), usually `include_str!`-ing a `.sql` file next to its
/// event definitions; [`views`] reads them back so the dumper can embed them. backbeat never parses
/// the text — it travels with the dump so a reader knows not just how to decode the events but how
/// to query them.
collect!;
/// Every registered [`ViewSet`]'s DDL text, in unspecified order. This is the set the dumper embeds
/// as [`Views`](crate::format::SectionKind::Views) sections.