Rust Library
Last updated
Was this helpful?
Last updated
Was this helpful?
This library lets you run machine learning models and collect sensor data on Linux and macOS machines using Rust. The SDK is open source and hosted on GitHub:
The Edge Impulse Rust SDK (via the edge_impulse_runner crate) provides safe, high-performance Rust bindings for running Edge Impulse models and uploading data on Linux and macOS. This library handles everything from model inference to sensor data ingestion, enabling seamless development of real-time and resource-efficient edge AI solutions.
The Edge Impulse Rust library enables developers to seamlessly run Edge Impulse models in Rust projects, offering robust performance, safety, and ergonomics.
To install the Edge Impulse Rust library, add the following dependency to your Cargo.toml
:
Effortlessly run .eim
models for:
Classification
Object Detection
Visual Anomaly Detection
Native support for:
Camera
Microphone
Directly upload sensor data to Edge Impulse using the built-in Ingestion API.
Execute models in continuous inference mode for real-time predictions.
Here’s a simple example to perform classification using an Edge Impulse model:
Use the ingestion feature to upload training data directly:
Explore comprehensive examples demonstrating the library's capabilities:
Basic Classification
Image Processing
Video-based Object Detection
Sensor Data Ingestion
Find and run these examples directly from the GitHub repository.
Refer to our api site for detailed information on structs, enums, type aliases, and constants. The crate structure includes:
error – Error types for the Edge Impulse Runner (EimError, etc.)
inference – Core inference logic (EimModel, model initialization, inference calls)
ingestion – Data ingestion functionality (Ingestion, uploading files or sensor data)
types – Common types (BoundingBox, ModelParameters, SensorType, etc.)
The Edge Impulse Rust SDK is a powerful tool for developers looking to leverage machine learning on edge devices. With its focus on performance and safety, it allows you to build efficient applications that can run directly on Linux and macOS systems. The library is designed to be easy to use, with clear examples and comprehensive documentation to help you get started quickly.
By combining Rust’s speed and safety with Edge Impulse’s robust ML capabilities, you can create efficient, reliable edge AI applications on Linux and macOS. Check out our Comprehensive API Guide in Section 6 whenever you need deeper insights into the crate’s internals, error handling, or module-level details.
Engage with the Edge Impulse Rust community:
GitHub Repository: Contribute, report issues, and collaborate.
Share your projects: Inspire others by showcasing your Rust-based Edge AI applications.