murk-core 0.1.8

Core types and traits for the Murk simulation framework
Documentation

murk-core

Core types crate for the Murk simulation engine.

Defines the foundational types shared across all Murk crates: field definitions, commands, receipts, IDs, error types, and the core traits (FieldReader, FieldWriter, SnapshotAccess).

Most users should depend on the top-level murk crate instead, which re-exports these types via murk::types.

Installation

cargo add murk-core

Most users should depend on the top-level murk crate, which re-exports this as murk::types.

When to use directly

Depend on this crate directly only if building custom crates outside the Murk workspace or need minimal dependencies.

Usage

use murk_core::{FieldDef, FieldType, FieldMutability, BoundaryBehavior};

let heat = FieldDef {
    name: "heat".into(),
    field_type: FieldType::Scalar,
    mutability: FieldMutability::PerTick,
    units: Some("kelvin".into()),
    bounds: Some((0.0, 1000.0)),
    boundary_behavior: BoundaryBehavior::Clamp,
};

let velocity = FieldDef {
    name: "wind".into(),
    field_type: FieldType::Vector { dims: 3 },
    mutability: FieldMutability::Static,
    units: None,
    bounds: None,
    boundary_behavior: BoundaryBehavior::Clamp,
};

Documentation