[package]
name = "glamx"
version = "0.1.0"
authors = ["Sébastien Crozet <developer@crozet.re>"]

description = "Extensions for glam: Pose2, Pose3, Rot2, and matrix utilities."
documentation = "https://docs.rs/glamx"
homepage = "https://dimforge.com"
repository = "https://github.com/dimforge/parry"
readme = "README.md"
keywords = ["math", "geometry", "rotation", "pose", "glam"]
categories = ["mathematics", "game-development", "no-std"]
license = "MIT OR Apache-2.0"
edition = "2021"

[features]
default = ["std"]

# Standard library support
std = ["glam/std", "simba/std", "approx?/std"]

# Serialization features
serde = ["dep:serde", "glam/serde", "glamx-serde"]
glamx-serde = []  # Internal flag to enable serde derives on glamx types

# Bytemuck support
bytemuck = ["dep:bytemuck", "glam/bytemuck"]

# Nalgebra interop
nalgebra = ["dep:nalgebra"]

# Math library features
libm = ["glam/libm", "simba/libm_force", "num-traits/libm"]

# Approx is always available via re-export
approx = ["dep:approx", "glam/approx"]

# CUDA support (glam feature)
cuda = ["glam/cuda"]

# Scalar math (glam feature) - enabled by default in glam
scalar-math = ["glam/scalar-math"]

# Debug assertions for glam
debug-glam-assert = ["glam/debug-glam-assert"]
glam-assert = ["glam/glam-assert"]

# Fast math approximations
fast-math = ["glam/fast-math"]

# Rkyv serialization
rkyv = ["glam/rkyv"]

# Mint interop
mint = ["glam/mint"]

# Rand support
rand = ["glam/rand"]

encase = ["glam/encase"]

[dependencies]
glam = { version = "0.30", default-features = false }
simba = { version = "0.9", default-features = false }
num-traits = { version = "0.2", default-features = false, features = ["libm"] }
approx = { version = "0.5", default-features = false, optional = true }
serde = { version = "1.0", optional = true, features = ["derive"] }
bytemuck = { version = "1", features = ["derive"], optional = true }
nalgebra = { version = "0.34", default-features = false, features = ["convert-glam030"], optional = true }

[dev-dependencies]
approx = "0.5"
glam = { version = "0.30", features = ["approx"] }
