bistun-core 2.0.3

The authoritative Linguistic DNA models and DTOs for the Bistun LMS. Provides a high-performance, immutable contract layer for BCP 47 locale resolution, typographic traits, and linguistic metadata.
Documentation
// Copyright (C) 2026 Francis Xavier Wazeter IV
// SPDX-License-Identifier: GPL-3.0-or-later
//
// This file is part of the Bistun Linguistic Metadata Service (LMS).
// See the LICENSE file in the workspace root for full license information.

//! # Shared Data Models (`DTO`s) & Foundation
//! **Crate**: `bistun-core`
//! **Ref**: `[011-LMS-DTO]`
//! **Domain**: `Delivery`
//! **Location**: `crates/bistun-core/src/lib.rs`
//!
//! **Why**: This crate serves as the authoritative central hub for the system's Data Transfer Objects (`DTO`s) and shared vocabulary. It flattens the internal module hierarchy to provide a clean, ergonomic Public `API` for all consuming crates and sidecars.
//! **Impact**: This module defines the contract layer of the entire Bistun ecosystem; any breaking changes here will instantly propagate across the service boundary, potentially corrupting serialization logic in all downstream `SDK`s.
//!
//! ### Architectural Topology
//! * **Tier**: `0`
//! * **Dependencies**: `serde`, `hashbrown`, `thiserror`
//! * **Consumers**: Downstream `UI` and `NLP` systems, `Delivery` layer microservices
//! * **State Model**: `Stateless`
//! * **Design Patterns**: `Re-export`
//!
//! ### Local Definitions
//! * **`Re-export`**: A technique to provide a more ergonomic `API` by exposing items from submodules at the root level.
//! * **`System of Record (SoR)`**: The authoritative data source for global language capabilities. Guarantees immutability and reproducibility through versioned snapshots.

pub mod error;
pub mod manifest;
pub mod traits;

// [`Persistence`] Domain: Opt-in for Engine and `Persistence` tools
#[cfg(feature = "persistence")]
pub mod registry;

// [`Operations`] Domain: Opt-in for Observability and `API` tools
#[cfg(feature = "ops")]
pub mod ops;

// Testing Domain: Opt-in for `QA` and Simulation
#[cfg(feature = "testing")]
pub mod simulation;

// `Re-export` core `DTO` for ergonomic `API` usage
pub use manifest::{CapabilityManifest, TraitValue};

// `Re-export` the shared vocabulary (Updated for v2.0.0 Logic Provider)
pub use traits::{
    CasingRule, Direction, LmsRule, MorphType, NormRule, PluralRule, SegType, TraitKey, TransRule,
};

// `Re-export` Errors
pub use error::LmsError;

// `Re-export` `Persistence` Models
#[cfg(feature = "persistence")]
pub use registry::{LocaleProfile, RegistryMetadata, RegistryStore, WormPayload};

// `Re-export` Operational Models
#[cfg(feature = "ops")]
pub use ops::{ResolutionMetrics, SdkState, SyncMetrics};

// Testing `Re-export`s
#[cfg(feature = "testing")]
pub use simulation::*;