xnn 0.2.0

A lightweight ML framework with GPU-first architecture
Documentation
# xnn

[![Crates.io](https://img.shields.io/crates/v/xnn.svg)](https://crates.io/crates/xnn)
[![Documentation](https://docs.rs/xnn/badge.svg)](https://docs.rs/xnn)
[![License](https://img.shields.io/crates/l/xnn.svg)](LICENSE)

A lightweight ML framework built from scratch in Rust with GPU-first architecture.

## Features

- GPU acceleration via [wgpu]https://wgpu.rs/ (Vulkan, Metal, DX12, WebGPU)
- Element types: `f32`, `i32`, `u32`, `bool`
- Cross-platform: Linux, macOS, Windows, Web/WASM
- Automatic compute pipeline caching
- No unsafe code

## Tensor

N-dimensional array with GPU-accelerated operations and automatic broadcasting.

## Elements

| Type | Numeric | Signed | Integer | Float | Logical |
|------|---------|--------|---------|-------|---------|
| `f32` ||| || |
| `i32` |||| | |
| `u32` || || | |
| `bool` | | | | ||

## Examples

### MNIST Training

Trains a fully-connected network on the MNIST dataset.

```sh
cd examples/mnist-train
cargo run --release
```

### MNIST Web

Interactive digit recognition in the browser using WebGPU and WASM.

```sh
cd examples/mnist-web
wasm-pack build --target web
python3 -m http.server
```

### Linear regression

Trains a simple linear model to fit `y = wx + b`.

```sh
cargo run --release --example linreg
```

### XOR

Trains a 2-layer neural network to solve the XOR problem.

```sh
cargo run --release --example xor
```

## License

MIT — see [LICENSE](LICENSE) for details.