xBarcode is a next-generation barcode generation engine written in pure Rust, optimized for WebAssembly (Wasm) and high-throughput server environments. It is engineered to be the fastest and most memory-efficient library in the Rust ecosystem.
Note: This is the public documentation and issue tracker repository. The core engine is proprietary software available for commercial licensing and free via our public API/Wasm demo.
xBarcode utilizes a Hybrid Architecture (Fast-Path Mode + Dynamic Programming) to achieve generation speeds up to 6x faster than leading alternatives.
| Symbology | Input Type | xBarcode | Competitor | Speedup |
|---|---|---|---|---|
| QR Code | Numeric | 4.3 µs | 28 µs (fast_qr) | 6.7x 🚀 |
| QR Code | Alphanumeric | 10.7 µs | 39 µs (fast_qr) | 3.6x 🚀 |
| Data Matrix | Alphanumeric | 1.4 µs | 2.8 µs (rxing) | 2.0x 🚀 |
| Aztec | Numeric | 1.5 µs | 7.4 µs (rxing) | 4.9x 🚀 |
| PDF417 | Alphanumeric | 3.7 µs | 7.4 µs (rxing) | 2.0x 🚀 |
| Code 128 | Standard | 0.78 µs | 1.5 µs (rxing) | 1.9x ⚡ |
| EAN-13 | Product | 0.13 µs | 0.41 µs (rxing) | 3.2x 🚀 |
| EAN-8 | Product | 0.10 µs | 0.28 µs (rxing) | 3.0x 🚀 |
| ITF | Numeric | 0.14 µs | 0.37 µs (rxing) | 2.6x 🚀 |
(Benchmark: Apple M4, Single-Threaded, Feb 2026)
Unlike Java ports that rely on heavy garbage collection, xBarcode uses a strict stack-allocation and buffer-reuse strategy for the hot path.
- 0 Unsafe Blocks (Memory Safe).
- 0 Runtime Allocations for standard payloads.
Speed doesn't mean larger codes. xBarcode employs a graph-based Dynamic Programming (DP) algorithm to find the absolute smallest physical barcode size for mixed data (e.g., Chinese + Numbers).
- xBarcode: Version 3
- Competitors: Version 4 (Larger, harder to scan)
| 2D Matrix | 1D Linear | Special |
|---|---|---|
| QR Code (Model 2) | Code 128 (A/B/C) | GS1 DataMatrix |
| Data Matrix (ECC200) | EAN-13 / UPC-A | GS1-128 |
| Aztec Code | Code 39 | Micro QR |
| PDF417 (Compact) | ITF-14 | WiFi / VCard |
Try the live demo at xbarcode.ai. The Wasm binary is available for integration into enterprise web apps.
Optimized for the Edge. Zero cold-start latency (2ms).
- API:
POST https://api.xbarcode.ai/v1/generate(Contact for access)
Detailed technical documentation is available in the docs/ directory.
- Issues: Please use the Issues tab to report bugs or request features.
- Discussion: Join the conversation in Discussions.
- License: Copyright © 2026 xBarcode Team. All rights reserved.
xbarcode.ai - The Fastest is also the Best.