7 releases
Uses new Rust 2024
| new 0.2.4 | Feb 28, 2026 |
|---|---|
| 0.2.3 | Feb 11, 2026 |
| 0.1.0 | Jan 21, 2026 |
| 0.0.1 | Dec 4, 2025 |
#11 in #vec3
26 downloads per month
Used in 9 crates
61KB
1K
SLoC
Astrelis Core
This crate provides the foundational functionality for the Astrelis game engine, including math utilities, logging, profiling, geometry types, and custom allocators.
Overview
The astrelis-core crate is dependency-free (except for re-exported external crates) and
serves as the foundation for all other Astrelis crates. It provides:
- Math: Re-exports of
glamtypes (Vec2,Vec3,Mat4, etc.) for linear algebra - Logging: Structured logging via
tracingwith [logging::init()] - Profiling: Performance profiling integration with
puffinviaprofiling - Geometry: Common 2D geometry types (sizes, positions, coordinate spaces)
- Allocators: Custom allocators like
ahashfor fast hashing
Modules
math: Linear algebra types and utilities (re-exportsglam)logging: Initialize and configure tracing-based loggingprofiling: Performance profiling with puffin integrationgeometry: 2D geometry primitives (rectangles, transforms, etc.)alloc: Custom allocators and hash functions
Quick Start
use astrelis_core::{logging, math::Vec2};
// Initialize logging (outputs to stdout with timestamps)
logging::init();
// Use math types
let position = Vec2::new(10.0, 20.0);
let velocity = Vec2::new(1.0, 0.5);
let new_position = position + velocity * 0.016; // Delta time
tracing::info!("New position: {:?}", new_position);
Usage with Other Crates
The astrelis-core crate is typically used as a foundation for higher-level crates:
[dependencies]
astrelis-core = "0.1"
astrelis-winit = "0.1" # Window management (depends on core)
astrelis-render = "0.1" # Rendering (depends on core)
Feature Flags
profiling(default): Enables puffin-based profiling. When disabled, all profiling macros and functions become zero-cost no-ops.winit(default): Enables winit window type re-exports.
See Also
Dependencies
~15–38MB
~556K SLoC