docs.rs failed to build tauri-plugin-outis-captcha-1.0.1
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Tauri Plugin: Outis Captcha
A drop-in Tauri plugin for local, offline captcha solving.
Powered by outis-captcha-core with a custom-trained ONNX model.
Features
- Zero Runtime Config: No model paths, no downloads, no network requests at runtime.
- Offline Ready: The model is downloaded at build time and embedded directly into the application binary.
- Fast: ~50ms inference time on CPU.
Installation
-
Add dependency:
Full feature set (recommended):
[] = { = "https://github.com/milangress/outis", = "main" } -
Register the plugin in
src-tauri/src/lib.rs: -
Allow permissions in
src-tauri/capabilities/default.json(or similar):
Usage (Frontend)
import { invoke } from '@tauri-apps/api/core';
// 1. Initialize (Optional)
// Pre-loads the model into memory. If you skip this, it auto-loads on first use.
// Doing this at app startup makes the first user interaction feel instant.
await invoke('plugin:outis-captcha|init_model');
// 2. Break a Captcha
try {
const result = await invoke<string>('plugin:outis-captcha|read_captcha', {
// You can pass:
// - A URL (http://...) -> Plugin will download it
// - A Data URI (data:image/png;base64,...)
// - A local file path (/Users/...)
imagePath: 'https://example.com/captcha.png'
});
console.log('Captcha Result:', result);
} catch (error) {
console.error('Failed to break captcha:', error);
}
How it Works (Model Downloading)
You might wonder where the model comes from if you don't provide it.
- Build Time: When you run
cargo build, theoutis-captcha-corebuild script checks for the model file (assets/outis-model.rten). - Auto-Download: If the file is missing (e.g., in a CI environment or fresh clone), it automatically downloads the latest version from HuggingFace (
Milang/outis) to Rust'sOUT_DIR. - Embedding: The model bytes (~19MB) are then compiled into the binary itself.
- Runtime: When your app runs, the plugin loads the model directly from memory. This guarantees the model is always available and version-matched to the code.