Files
kumomta/crates/config
Wez Furlong 70d9ec394a config: introduce declare_event! macro
There should be no functional change here; this commit refactors
how we pre-declare CallbackSignatures with lua. The rationale is:

* It is important to correct declare single vs. multiple implementation
  event handler types before any lua code is run; we've had a couple
  of issues in the past where some part of this pre-registration
  was messed up.
* Adding a new signature requires declaring it in a global, and
  remembering to add its registration to the right place
* Declaring signatures is a bit boilerplatey and makes it hard
  grok the purpose of the event handler arguments at a glance

The declare_event! macro defined in this commit makes it a bit
more readable to declare these event types and automatically
wires up the registration to the correct spot, improving the
ergonomics significantly.

A downside of this additional layer of macro stuff that it
requires increasing the rustc recursion limit.
2025-03-06 06:35:38 -07:00
..