# Architecture
rustensor stores model checkpoint descriptors in `.rten` files.
An `.rten` file has two main parts:
1. A fixed 48-byte header.
2. A serialized checkpoint payload.
The header contains:
- magic bytes: `RTEN`
- format version
- reserved flags
- payload length
- SHA-256 checksum of the payload
The payload contains:
- model metadata
- tensor layer descriptors
- tensor shape
- tensor data
The checksum is calculated only over the payload.
## Design goals
rustensor is designed to be:
- small;
- Rust-native;
- auditable;
- versioned;
- defensive during loading;
- honest about scope.
## Scope boundaries
rustensor does not train models.
rustensor does not run inference.
rustensor does not implement autograd.
rustensor does not replace ONNX, GGUF or SafeTensors.
rustensor does not provide authenticity guarantees.
SHA-256 detects accidental corruption.
It does not prove who created the file.