pybevy_core 0.2.0

Core storage primitives for PyBevy - validity tracking, borrowed references, runtime type registry
Documentation

Core storage primitives and runtime registries for PyBevy

This crate provides the foundational types for PyBevy's owned/borrowed pattern and the runtime type registry system that enables crate splitting.

Storage Primitives

  • ValidityFlag / ValidityFlagWithMode - Runtime validity tracking
  • ValidityGuard - RAII guard for system execution scope
  • ValueStorage<T> - Generic storage for Copy types (Vec3, Quat, etc.)
  • FieldStorage<T> - Generic storage for non-Copy types (TextureAtlas, etc.)
  • BorrowableStorage / FromBorrowedStorage - Traits for borrowed field access

Runtime Registries

  • ComponentBridge - Trait for component type bridges
  • AssetBridge - Trait for asset type bridges
  • PluginBridge - Trait for plugin type bridges
  • DynamicComponentRegistry - Runtime registry for component bridges
  • DynamicAssetRegistry - Runtime registry for asset bridges

The registry system allows feature crates (pybevy_audio, pybevy_light, etc.) to register their types without the core crate needing to import them at compile time, enabling independent compilation and faster incremental builds.