visionkit-rs
Safe Rust bindings for Apple's VisionKit.framework on macOS.
Status: v0.2.1 covers the full public macOS
ImageAnalysisOverlayViewsurface — including delegates, menu tags, selection metadata, tracking views, fonts, and subject analysis — alongsideImageAnalyzer,ImageAnalysis, and 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_results- full
LiveTextInteractioncoverage for macOSImageAnalysisOverlayView, including delegates, menu tags, selection metadata, tracking/content views, fonts, and subject analysis VNDocumentCameraViewController,DataScannerViewController,RecognizedText,Barcode, andRecognizedItemavailability metadata on macOS
Availability
ImageAnalyzer,ImageAnalysis, andLiveTextInteractionare available on macOS 13+.LiveTextInteraction::text,selected_text,selected_attributed_text,selected_ranges, andLiveTextMenuTagrequire 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.