visionkit-rs
Safe Rust bindings for Apple's VisionKit.framework on macOS.
Status: v0.2.0 covers
ImageAnalyzer,ImageAnalysis, a headless-friendlyLiveTextInteractionwrapper over macOSImageAnalysisOverlayView, and ships explicit availability metadata for the iOS-only document-camera / Data Scanner / recognized-item areas.
Quick start
use *;
Highlights
ImageAnalyzer::is_supportedandsupported_text_recognition_languagesImageAnalyzerConfiguration,ImageAnalysisTypes, andImageOrientation- File-path based analysis through every public macOS analyzer overload: URL,
NSImage,CGImage,CIImage, andCVPixelBuffer ImageAnalysis::transcriptandhas_resultsLiveTextInteractioncontrol over macOSImageAnalysisOverlayViewstate and inspectionVNDocumentCameraViewController,DataScannerViewController,RecognizedText,Barcode, andRecognizedItemavailability metadata on macOS
Availability
ImageAnalyzer,ImageAnalysis, andLiveTextInteractionare available on macOS 13+.LiveTextInteraction::textandselected_textrequire macOS 14+ because Apple introduced those overlay accessors after macOS 13.VNDocumentCameraViewController,DataScannerViewController,RecognizedText,Barcode, andRecognizedItemare iOS-only Apple APIs. On macOS, this crate exposes them as structured availability metadata instead of pretending they exist.
Examples
See COVERAGE.md for the audited VisionKit API matrix.
License
Licensed under either of Apache-2.0 or MIT at your option.