gemath 0.1.0

Type-safe game math with type-level units/spaces, typed angles, and explicit fallible ops (plus optional geometry/collision).
Documentation
# Development guide (build + test matrix)

This document lists **supported** (and periodically sanity-checked) build/test commands across the crate’s major feature sets.

## Workspace vs crate directory

This repository is a Rust workspace. You can run commands from:

- the workspace root (`../Cargo.toml`) using `-p gemath`, or
- the crate directory (`gemath/`) directly.

Examples below show the “crate directory” form.

## Baseline

- **Default (`std` + `full`)**

```bash
cargo test
```

- **Bench build (default features)**

```bash
cargo bench --no-run
```

## `no_std` / `no_alloc`

- **Minimal `no_std` (no allocation)**
  - Requires `libm` for float math.

```bash
cargo build --no-default-features --features libm
```

- **`no_std + alloc`**

```bash
cargo test --no-default-features --features "libm,alloc"
```

## Geometry / collision / spatial subsets

- **Geometry-only subset (no allocation required)**

```bash
cargo test --no-default-features --features "libm,geometry"
```

- **Collision subset (no allocation required)**

```bash
cargo test --no-default-features --features "libm,collision"
```

- **Spatial subset (allocation required)**

```bash
cargo test --no-default-features --features "libm,alloc,spatial"
```

## Interop features

- **Serde support**

```bash
cargo test --features serde
```

- **Mint support**

```bash
cargo test --features mint
```

## Benchmarks

`gemath` includes criterion benches (including comparisons against `glam`).

Run all benches:

```bash
cargo bench
```

Run only spatial benches:

```bash
cargo bench --bench spatial_benchmarks
```

## Packaging sanity check (what crates.io will see)

Before publishing, it’s useful to verify that the crate packages cleanly:

```bash
cargo package
```

## “Kitchen sink” compile checks (useful when refactoring features)

- **No default features, `mint` (library-only compile)**
  - This checks that `mint` interop compiles under `no_std` (tests may be gated off).

```bash
cargo build --no-default-features --features "libm,mint"
```