katra-core 0.1.0

Katra3D core: shared vocabulary, error model, event model, IDs, and policy types.
Documentation
//! katra-core — the shared vocabulary of Katra3D.
//!
//! Every other crate builds on the types defined here so that the semantic
//! request graph, the trace format, the profiler, the reporters, and the
//! runtime subsystems can cooperate directly without FFI boundaries.
//!
//! This crate intentionally contains **no unsafe code** and **no I/O**.
//! It is the vocabulary, the error model, and the policy types.
//!
//! # Format stability discipline
//!
//! Several types here are serialized into the Katra trace format
//! (`katra-trace`). Enum layouts are serialized by variant index, therefore:
//!
//! * **Append-only evolution**: new enum variants must be appended at the end.
//! * Any layout-affecting change must bump the trace format version and/or the
//!   schema hash (see `katra-trace::header`).

#![forbid(unsafe_code)]
#![warn(missing_docs)]

pub mod config;
pub mod deadline;
pub mod error;
pub mod event;
pub mod hash;
pub mod ids;
pub mod kind;
pub mod payload;
pub mod scope;
pub mod subsystem;
pub mod time;
pub mod version;

pub use config::{CaptureOptions, HardwareProfile};
pub use deadline::DeadlineClass;
pub use error::{ErrorCategory, KatraError, Result};
pub use event::{EmitOpts, TraceEvent};
pub use hash::{fnv1a, fnv1a_combine, fnv1a_parts, fnv1a_str};
pub use ids::{AllocId, ArenaId, Epoch, FileKey, OpId, RequestId, ResourceRef, Seq, SpanId};
pub use kind::{D3d12Call, EventKind, Phase, VulkanCall};
pub use payload::{
    CachePayload, D3d12Payload, DecompressPayload, FilePayload, GpuPayload, IoPayload,
    KatraPayload, MemPayload, Payload, PresentPayload, RawPayload, ShaderPayload, SyncPayload,
    ThreadPayload, VulkanPayload,
};
pub use scope::Scope;
pub use subsystem::{PromotionState, Subsystem};
pub use time::{monotonic_now_ns, wall_now_ns};
pub use version::KATRA_VERSION;