Skip to content

feat: Upgrade to zxing-cpp 0.5.0 with improved error handling#23

Merged
tanagumo merged 4 commits into
masterfrom
feat/upgrade-zxing-cpp-0.5.0
Feb 15, 2026
Merged

feat: Upgrade to zxing-cpp 0.5.0 with improved error handling#23
tanagumo merged 4 commits into
masterfrom
feat/upgrade-zxing-cpp-0.5.0

Conversation

@tanagumo
Copy link
Copy Markdown
Owner

@tanagumo tanagumo commented Feb 14, 2026

Summary

Upgrades pyrxing to use zxing-cpp 0.5.0 with enhanced error handling and type safety improvements.

Key Changes

Core Improvements

  • Upgraded to zxing-cpp 0.5.0: Updated Rust bindings to latest version with new API
  • Better error handling: Migrated from anyhow to thiserror for precise, typed errors
  • Type-safe conversions: Changed From to TryFrom for barcode format conversion, eliminating panics
  • Complete format support: All 32 barcode format variants now properly supported
  • Memory optimization: Uses stack-based arrays instead of heap allocation for format conversion
  • Backward compatibility: Format names remain consistent (e.g., DataBarExpanded instead of DataBarExp)

API & Documentation

  • Updated type stubs: Complete list of 32 barcode formats in .pyi file
  • Fixed Point types: Changed from float to int to match actual implementation
  • Updated benchmarks: Latest performance comparison with zxing-cpp 3.0.0
  • Refreshed README: Updated performance metrics and API documentation

@tanagumo tanagumo force-pushed the feat/upgrade-zxing-cpp-0.5.0 branch 2 times, most recently from a90503f to 84b2117 Compare February 15, 2026 08:16
- Upgrade to zxing-cpp 0.5.0 Rust bindings
- Migrate from anyhow to thiserror for precise error types
- Change From to TryFrom for type-safe barcode format conversion
- Add support for all 32 barcode format variants
- Optimize memory usage with stack-based arrays instead of heap allocation
- Maintain backward compatibility for format names (e.g., DataBarExpanded)
- Update type stubs with complete format list and correct Point types
- Update benchmarks and documentation with latest results
- Add dev dependencies for testing (pytest, pillow, managed via uv)
- Update Ubuntu runners from 22.04 to 24.04
- Standardize Linux x86_64 builds to use PyO3/maturin-action
- Add explicit C++20 standard support with CXXFLAGS
- Update macOS runner to macos-15 and add Xcode setup
- Update Alpine base image to Python 3.14.3
@tanagumo tanagumo force-pushed the feat/upgrade-zxing-cpp-0.5.0 branch from 84b2117 to 4e6426f Compare February 15, 2026 08:19
@tanagumo tanagumo merged commit b7016b2 into master Feb 15, 2026
10 checks passed
@tanagumo tanagumo deleted the feat/upgrade-zxing-cpp-0.5.0 branch February 15, 2026 08:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant