Expand description
§Sable Core
Core utilities, math primitives, and foundational types for the Sable engine.
§Modules
math— Vector, matrix, and quaternion typeshandle— Generational index handles for safe resource referencescolor— Color types with various color space supporttime— Time tracking and delta time utilities
§Feature Flags
f64— Use 64-bit floats instead of 32-bit for math typesparallel— Enable parallel iteration with rayon and concurrent data structuresasync— Enable async time utilities with tokio
§Parallelization
With the parallel feature (enabled by default), you can use parallel iteration:
ⓘ
use rayon::prelude::*;
// Parallel iteration over handle allocator values
allocator.par_values().for_each(|value| {
// Process in parallel
});
// Thread-safe concurrent allocator
use sable_core::handle::ConcurrentHandleAllocator;
let allocator = ConcurrentHandleAllocator::new();§Async Support
With the async feature, async time utilities are available:
ⓘ
use sable_core::time::async_time::{sleep, Interval, timeout};
async fn game_loop() {
let mut interval = Interval::from_hz(60.0);
loop {
interval.tick().await;
update();
}
}Re-exports§
pub use rayon;