Expand description
§Indigauge Core
Foundation crate for the Indigauge Rust SDK. It provides the shared building blocks that other crates build on:
- Event macros (
ig_info!,ig_warn!,ig_error!, etc.) with compile-time validation ofnamespace.eventnames. - Pluggable dispatcher so host environments (Bevy, servers, tools) decide how events are queued or sent.
- Optional tracing layer that forwards tracing spans/events to Indigauge.
- Optional panic handler that captures crashes as events (native targets).
- Hardware helpers (CPU/RAM bucketing, CPU name coarsening) for lightweight device context.
§Quick start
ⓘ
use indigauge_core::{ig_info, set_event_dispatcher};
use serde_json::Value;
fn dispatcher(_level: &'static str, etype: &str, meta: Option<Value>, _file: &'static str, _line: u32, _module: &'static str) -> bool {
println!("Dispatch {etype} with meta: {meta:?}");
true
}
fn main() {
set_event_dispatcher(dispatcher);
ig_info!("game.start", { "build": "dev" });
}§Features
panic_handler— capture panics as events (native targets only).tracing— exposeIndigaugeLayerandIndigaugeSinkto ship tracing events.
§License
Dual-licensed under MIT or Apache-2.0.
Modules§
Macros§
- enqueue_
ig_ event - Low-level helper used by the
ig_*macros to queue an event. - ig_
debug - Logs or enqueues a debug-level event to Indigauge.
- ig_
error - Logs or enqueues an error-level event to Indigauge.
- ig_
event - Emit an Indigauge event at the given level with optional structured metadata.
- ig_info
- Logs or enqueues an info-level event to Indigauge.
- ig_
trace - Logs or enqueues a trace-level event to Indigauge.
- ig_warn
- Logs or enqueues a warning-level event to Indigauge.