akuna-infer
Intelligent file-type inference using the Google Magika ML model in native Rust using Burn.
Runs natively in Rust, supports hardware acceleration, and has zero runtime dependencies.
Features
- Magika-compatible preprocessing and output post-processing
- Generic
Session<B>andMagikaModel<B>built on Burn'sBackendabstraction - Vendored
standard_v3_3model fromsrc/vendor/assets/models/standard_v3_3/model.onnx - Tested parity against the Rust
magikacrate on local test fixtures
Usage
use Session;
use ;
use Path;
Development
This project uses a Nix development shell.
If you use nix-direnv, it should activate automatically.
To enter it manually:
Run all checks with:
Run tests only with:
Benchmarks
Run all benchmarks, results are written to target/criterion/.
Scripts
Refresh vendored upstream code and detection model:
- Google Magika model and type structs come directly from https://github.com/google/magika