This document explains the canonical event-name format used across the Indigauge
Rust SDK and the ig_* macros. It matches the runtime and compile-time
validation implemented in indigauge-core so names used in your game will be
accepted by the SDK and by the ig_* macros.
namespace.event (exactly one .). cannot be first or lastExamples:
Invalid examples (reason in comments):
ig_* macros (eg. ig_info!, ig_warn!) validate event_type at
compile time when you provide a string literal or const string.Example — compile-time checked:
Note: passing a runtime String (non-const) to the macro will not satisfy
compile-time validation and will not compile.
All macros accept an optional inline JSON-like metadata object:
namespace (domain area): ui, player, game,
network, save.event: click, jump, start, failed.metadata, not in the event name.Good:
ui.clickplayer.jumpsession.startAvoid:
Defining event-type consts reduces typos and keeps values discoverable:
Because the macros perform compile-time validation, const or literal
strings are the recommended approach for re-use.
When the tracing feature is enabled the tracing layer will forward structured
log events that carry an ig field to Indigauge. Example:
Use the same namespace.event naming rules for the ig field.
ig_* macros dispatch events through a pluggable dispatcher (the
host crate must register one via set_event_dispatcher). The Bevy plugin
does this automatically when enabled.namespace.event (exactly one dot)const values (compile-time validation)References
validate_event_type_compile_time (compile-time check in indigauge-core)ig_info!, ig_warn!, ig_error! (event macros)