Skip to main content

Crate coreml_native

Crate coreml_native 

Source
Expand description

Safe, ergonomic Rust bindings for Apple CoreML inference with ANE acceleration.

§Platform Support

Requires macOS or iOS. On non-Apple targets, types exist as stubs returning Error::UnsupportedPlatform.

Re-exports§

pub use async_bridge::CompletionFuture;
pub use batch::BatchPrediction;
pub use batch::BatchProvider;
pub use compile::compile_model;
pub use compile::compile_model_async;
pub use compute::available_devices;
pub use compute::ComputeDevice;
pub use description::FeatureDescription;
pub use description::FeatureType;
pub use description::ModelMetadata;
pub use description::ShapeConstraint;
pub use error::Error;
pub use error::ErrorKind;
pub use error::Result;
pub use model_lifecycle::ModelHandle;
pub use state::State;
pub use tensor::AsMultiArray;
pub use tensor::BorrowedTensor;
pub use tensor::DataType;
pub use tensor::OwnedTensor;

Modules§

async_bridge
Runtime-agnostic bridge from Apple completion handlers to Rust futures.
batch
Batch prediction support via MLArrayBatchProvider.
compile
Model compilation (.mlmodel/.mlpackage -> .mlmodelc).
compute
Compute device enumeration and inspection.
description
Model introspection types.
error
Error types for the coreml crate.
model_lifecycle
Model lifecycle management — unload/reload for memory efficiency.
state
Stateful prediction support (MLState).
tensor
Tensor types for zero-copy data exchange with CoreML.

Structs§

Model
Prediction

Enums§

ComputeUnits
Compute unit selection for CoreML model loading.