Skip to main content

Crate schema

Crate schema 

Source
Expand description

Replication schema and field codec definitions for the sdec codec.

This crate defines how game state is represented for replication:

  • Schema model for entity types, components, and fields
  • Field codecs (bool, integers, fixed-point, varints)
  • Quantization and threshold configuration
  • Deterministic schema hashing

§Design Principles

  • Runtime-first - v0 uses runtime schema building, derive macros come later.
  • Explicit schemas - No reflection on arbitrary Rust types.
  • Deterministic hashing - Schema hash is stable given the same definition.

Structs§

FieldCodec
Codec configuration for a single field.

Enums§

FieldKind
The kind of encoding for a field.

Functions§

schema_hash
Computes a deterministic hash for schema validation.

Type Aliases§

ComponentId
A component ID within a schema.
FieldId
A field ID within a component.