Expand description
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).
Re-exports§
pub use config::CaptureOptions;pub use config::HardwareProfile;pub use deadline::DeadlineClass;pub use error::ErrorCategory;pub use error::KatraError;pub use error::Result;pub use event::EmitOpts;pub use event::TraceEvent;pub use hash::fnv1a;pub use hash::fnv1a_combine;pub use hash::fnv1a_parts;pub use hash::fnv1a_str;pub use ids::AllocId;pub use ids::ArenaId;pub use ids::Epoch;pub use ids::FileKey;pub use ids::OpId;pub use ids::RequestId;pub use ids::ResourceRef;pub use ids::Seq;pub use ids::SpanId;pub use kind::D3d12Call;pub use kind::EventKind;pub use kind::Phase;pub use kind::VulkanCall;pub use payload::CachePayload;pub use payload::D3d12Payload;pub use payload::DecompressPayload;pub use payload::FilePayload;pub use payload::GpuPayload;pub use payload::IoPayload;pub use payload::KatraPayload;pub use payload::MemPayload;pub use payload::Payload;pub use payload::PresentPayload;pub use payload::RawPayload;pub use payload::ShaderPayload;pub use payload::SyncPayload;pub use payload::ThreadPayload;pub use payload::VulkanPayload;pub use scope::Scope;pub use subsystem::PromotionState;pub use subsystem::Subsystem;pub use time::monotonic_now_ns;pub use time::wall_now_ns;pub use version::KATRA_VERSION;
Modules§
- config
- Capture and hardware configuration.
- deadline
- Deadline classes (Katra3D §15).
- error
- The Katra error model.
- event
- The trace event — one correlated observation in a Katra trace.
- hash
- Deterministic hashing (FNV-1a 64).
- ids
- Typed identifiers. Newtype wrappers keep the type system honest: a
RequestIdcannot be silently passed where aSeqis expected. - kind
- Event vocabulary — the enum of everything KatraProfiler can capture.
- payload
- Structured event payloads.
- scope
- Event scope — which layer of the compatibility stack an event belongs to (KatraProfiler §5).
- subsystem
- Subsystems and promotion states.
- time
- Time helpers.
- version
- The current Katra3D version.