| Crates.io | qraisc-core |
| lib.rs | qraisc-core |
| version | 0.1.0 |
| created_at | 2026-01-20 19:58:32.481496+00 |
| updated_at | 2026-01-20 19:58:32.481496+00 |
| description | High-performance QR code validation and scannability scoring for artistic QR codes |
| homepage | |
| repository | https://github.com/SuperNovae-ai/qrai-scanner |
| max_upload_size | |
| id | 2057428 |
| size | 130,544 |
High-performance QR code validation and scannability scoring
🎨 Artistic QR • 🖼️ Image QR • 🎯 Custom QR • 📊 Scannability Score
Decode the undecodable. Built for AI-generated and stylized QR codes
that break standard scanners.
Features · Install · Quick Start · API · QR Code AI
Validate and score QR codes that standard scanners can't read:
[dependencies]
qraisc-core = "0.1"
use qraisc_core::{validate, is_valid, score};
fn main() {
// Simple validation - just check if QR is readable
if let Some(content) = is_valid("qr.png") {
println!("QR contains: {}", content);
}
// Get scannability score (0-100)
let s = score("qr.png");
println!("Scannability: {}/100", s);
// Full validation with stress tests
let bytes = std::fs::read("qr.png").unwrap();
let result = validate(&bytes).unwrap();
println!("Score: {}", result.score);
println!("Content: {:?}", result.content);
}
| Function | Description | Returns |
|---|---|---|
validate(&[u8]) |
Full validation with stress tests | Result<ValidationResult> |
validate_fast(&[u8]) |
Reduced stress tests (~2x faster) | Result<ValidationResult> |
decode_only(&[u8]) |
Decode without scoring (fastest) | Result<DecodeResult> |
| Function | Description | Returns |
|---|---|---|
is_valid(path) |
Check if QR is valid | Option<String> |
score(path) |
Get scannability score | u8 (0-100) |
score_bytes(&[u8]) |
Score from bytes | u8 (0-100) |
passes_threshold(path, min) |
Check minimum score | bool |
summarize(path) |
Get simple summary | QrSummary |
pub struct ValidationResult {
pub score: u8, // 0-100
pub decodable: bool,
pub content: Option<String>,
pub metadata: Option<QrMetadata>,
pub stress_results: StressResults,
}
pub struct QrMetadata {
pub version: u8, // 1-40
pub error_correction: ErrorCorrectionLevel,
pub modules: u8, // 21-177
pub decoders_success: Vec<String>,
}
pub struct StressResults {
pub original: bool,
pub downscale_50: bool,
pub downscale_25: bool,
pub blur_light: bool,
pub blur_medium: bool,
pub low_contrast: bool,
}
| Score | Rating | Description |
|---|---|---|
| 80-100 | Excellent | Safe for all devices |
| 70-79 | Good | Production ready |
| 60-69 | Acceptable | May fail on older phones |
| 40-59 | Fair | Consider regenerating |
| 0-39 | Poor | Needs redesign |
| Operation | Clean QR | Artistic QR |
|---|---|---|
decode_only |
~20ms | ~200ms |
validate_fast |
~50ms | ~500ms |
validate |
~80ms | ~1000ms |
MIT