Introduction
RustO! is a high-performance Optical Character Recognition (OCR) engine and cross-platform toolkit written in pure Rust. Based on RapidOCR and powered by PaddleOCR deep learning models with pure-Rust RTen lightweight inference backend (and pluggable custom engine architecture), RustO! delivers sub-second inference speeds, ultra-low memory overhead, zero OpenCV runtime dependencies, and 99.3%+ accuracy parity with native C++ OpenCV implementations.
🎯 Architecture Pipeline
RustO! orchestrates an end-to-end OCR and layout analysis pipeline optimized for edge devices and high-throughput servers:
⚡ Key Highlights & Advantages
- 🚀 100% Pure Rust Core: Zero OpenCV runtime dependency. Binarization, contour tracing, polygon clipping, and affine transformations are implemented in memory-safe Rust with SIMD acceleration.
- 📦 Ultra-Small Footprint: Core binaries are ~5 MB (self-contained) compared to 50+ MB for traditional OpenCV + ONNX runtime stacks.
- 📄 Human-Readable Spatial Layouts: Native support for reconstructing invoices, receipts, multi-column tables, and forms directly into visually formatted text.
- 🧠 Supported Model Ecosystem: Built-in support for PP-OCRv6 (Tiny, Small, Medium), PP-OCRv5 (Mobile, Server), and PP-OCRv4 (Mobile, Server) architectures.
- 🌐 50+ Languages in One Model: PP-OCRv6 uses a unified dictionary supporting Latin, Cyrillic, CJK, Devanagari, Arabic, and more simultaneously.
- 📱 Universal Multi-Platform SDKs: First-class support for Rust, .NET / C#, React Native, iOS (Swift), Android (Kotlin), and C FFI.
📦 Supported Platforms & Ecosystem
| Platform | Target Package / Registry | Support Matrix |
|---|---|---|
| Rust | cargo add rusto-rs (crates.io) | Linux, macOS, Windows, Android (NDK), iOS |
| Node.js (N-API) | npm install @rustors/node (npm) | Node.js 18+ (Linux, macOS, Windows) |
| Python | pip install rusto (PyPI) | Python 3.9+ (x86_64, aarch64, Apple Silicon) |
| Golang | go get github.com/byrizki/rusto-rs/packages/go | Go 1.21+ via Cgo (embedded rpath) |
| Java (JVM) | com.github.byrizki.rusto-rs:rusto-java (JitPack) | Java 17+, Kotlin, Scala via JNA |
| Dart | dart pub add rusto (pub.dev) | Dart 3.0+ on Desktop & Server |
| Flutter | flutter pub add rusto_flutter (pub.dev) | Android, iOS, Desktop |
| Web (WASM) | npm install @rustors/web | Modern Browsers, Cloudflare Workers, WASM |
| React | npm install @rustors/react | React 18+, Next.js, Vite |
| React Native | npm install @rustors/react-native (npm) | React Native 0.70+ (New Arch & Legacy) |
| iOS | Package.swift / pod 'RustO' (CocoaPods) | iOS 13.0+, Mac Catalyst (SPM & CocoaPods) |
| Android | com.github.byrizki.rusto-rs:rusto-android (JitPack) | Android API 21+ (ARM64-v8a, ARMv7a, x86_64, x86) |
| .NET / C# | dotnet add package RustODotnet (NuGet) | .NET 6.0+, .NET 8.0+, .NET Standard 2.0+ |
| C / Native | librusto.so / librusto.dylib / rusto.dll | C99 / C++11 and any foreign runtime with C FFI |
| CLI | rusto binary | Standalone command-line tool for desktop & CI pipelines |
📊 Performance & Parity Comparison
Benchmarks conducted on standard document scans (A4 invoice, 150 DPI) on an AMD Ryzen 7 / Apple M-series CPU:
| Metric | RustO! (Pure Rust + RTen) | Traditional OpenCV + C++ Pipeline | Advantage |
|---|---|---|---|
| Detection Speed | ~80 ms | ~85 ms | ⚡ 6% faster |
| Recognition Speed | ~120 ms | ~125 ms | ⚡ 4% faster |
| Accuracy Parity | 99.3%+ | Baseline (100%) | 🎯 Identical bounding boxes |
| Binary Footprint | ~5 MB | ~55 MB+ (libopencv, onnxruntime) | 📦 90% reduction |
| Peak Memory (RAM) | ~120 MB | ~260 MB+ | 🔒 54% lower memory |
| Safety | Memory-safe (Rust guarantees) | Manual pointers / potential leaks | 🛡️ Zero memory bugs |
🛡️ Security & Continuous Monitoring
RustO! is actively monitored and protected with the support of the Snyk Open Source Program. Snyk provides automated developer security tooling that continuously tests our pure Rust core engine, dependencies, container images, and multi-platform packages for known vulnerabilities.
For details on our vulnerability disclosure policy, see our Security Policy.
Next Steps
- Installation Guide — Set up RustO! on your preferred platform.
- Quick Start Tutorial — Run your first OCR scan in under 5 minutes.
- How-To Guides — Deep-dive tutorials for each programming language.
- API Reference — Complete specifications for
InitializeConfigandOcrRunOptions.