edgefirst-hal
EdgeFirst Hardware Abstraction Layer - A unified Rust library for edge AI inference pipelines.
This is the umbrella crate that re-exports the core EdgeFirst HAL components:
edgefirst-tensor- Zero-copy tensor memory management (DMA, SHM, system memory)edgefirst-image- High-performance image processing and format conversionedgefirst-decoder- ML model output decoding (YOLO, ModelPack)
Features
- Zero-copy memory management with DMA-BUF and POSIX shared memory support
- Hardware-accelerated image processing via G2D (NXP i.MX) and OpenGL
- Efficient ML post-processing for object detection and segmentation models
- Cross-platform - Linux (with hardware acceleration), macOS, and other Unix systems
Quick Start
use ;
// Create a tensor with automatic memory selection
let tensor = new?;
// Load and process an image
let img = load?;
let mut processor = new?;
processor.convert?;
// Decode YOLO model outputs
let decoder = new
.with_score_threshold
.with_iou_threshold
.build?;
Platform Support
| Platform | Memory Types | Image Acceleration |
|---|---|---|
| Linux (i.MX8) | DMA, SHM, Mem | G2D, OpenGL, CPU |
| Linux (other) | SHM, Mem | OpenGL, CPU |
| macOS | SHM, Mem | CPU |
| Other Unix | SHM, Mem | CPU |
License
Licensed under the Apache License, Version 2.0. See LICENSE for details.