Skip to content

Update tesseract-rs requirement from 0.1 to 0.2 in /ext/parsekit#31

Merged
cpetersen merged 1 commit intomainfrom
dependabot/cargo/ext/parsekit/tesseract-rs-0.2
Mar 31, 2026
Merged

Update tesseract-rs requirement from 0.1 to 0.2 in /ext/parsekit#31
cpetersen merged 1 commit intomainfrom
dependabot/cargo/ext/parsekit/tesseract-rs-0.2

Conversation

@dependabot
Copy link
Copy Markdown
Contributor

@dependabot dependabot bot commented on behalf of github Mar 30, 2026

Updates the requirements on tesseract-rs to permit the latest version.

Release notes

Sourced from tesseract-rs's releases.

v0.2.0 — Memory Safety & Robustness Release

Critical Fixes

  • Use-after-free in process_pages() CString handling
  • Undefined behavior in detect_os() freeing Tesseract's static pointer
  • Unsafe transmute replaced with safe from_int() enum conversions
  • Memory leak in get_word_confidences() (never freed C array)
  • ChoiceIterator incorrectly freed internal Tesseract pointer

Breaking Changes

  • Clone removed from TesseractAPI → use try_clone() (fallible)
  • MutableIterator removed (was dead duplicate of ResultIterator)
  • PageIterator, TessMonitor, TessResultRenderer methods now return Result<T>
  • is_valid_word() returns Result<bool> instead of Result<i32>
  • MutexError variant removed → use MutexLockError

Added

  • try_clone() — fallible clone for TesseractAPI
  • ResultIterator::get_choice_iterator() — access alternative recognition choices
  • 4 enum types re-exported: TessOrientation, TessWritingDirection, TessTextlineOrder, TessParagraphJustification
  • 179 tests (up from 14) — 91.6% code coverage
  • End-to-end test scenarios simulating real-world usage

Full Changelog

See https://github.com/cafercangundogdu/tesseract-rs/blob/HEAD/CHANGELOG.md for complete details.

Changelog

Sourced from tesseract-rs's changelog.

[0.2.0] - 2026-03-23

BREAKING CHANGES

  • Removed Clone impl for TesseractAPI — use try_clone() instead
  • Removed MutableIterator type from public API
  • Removed duplicate analyze_layout() — use analyse_layout() (matches C API)
  • Removed get_mutable_iterator() — use get_iterator()
  • Changed is_valid_word() return type from Result<i32> to Result<bool>
  • Changed PageIterator methods to return Result<T> instead of bare types
  • Changed TessMonitor methods to return Result<T> instead of bare types
  • Changed TessResultRenderer methods to return Result<T> instead of bare types
  • Removed duplicate MutexError variant — use MutexLockError
  • Deprecated get_word_confidences() — use all_word_confidences()

Fixed

  • Critical: Use-after-free in process_pages() CString handling
  • Critical: Undefined behavior in detect_os() freeing Tesseract's static pointer
  • Critical: Unsafe transmute replaced with safe from_int() enum conversions
  • Critical: Memory leak in get_word_confidences() (never called TessDeleteIntArray)
  • Critical: ChoiceIterator incorrectly freed internal Tesseract pointer via TessDeleteText
  • Fixed print_variables_to_file() inverted success/error logic
  • Fixed get_unichar() panicking on mutex lock failure
  • Fixed inconsistent mutex error handling (some modules panicked, others returned errors)
  • Fixed Drop implementations to use if let Ok() pattern (no panic on poisoned mutex)
  • Fixed null pointer comparison using == instead of .is_null()

Added

  • TesseractAPI::try_clone() — fallible clone that returns Result
  • ResultIterator::get_choice_iterator() — access alternative recognition choices
  • Re-exported TessOrientation, TessWritingDirection, TessTextlineOrder, TessParagraphJustification
  • Consistent #[cfg(feature = "build-tesseract")] on all extern blocks
  • 179 tests (from 14) covering all modules with 91.6% coverage
  • End-to-end tests simulating real-world usage scenarios
  • Shared test helpers module

Removed

  • src/mutable_iterator.rs — was a complete duplicate of ResultIterator
  • Unnecessary clippy allow attributes

[0.1.20] - 2025-07-27

Added

  • Comprehensive unit tests for error handling and enums
  • Benchmark tests using criterion
  • Code coverage reporting with tarpaulin
  • Commit message standards (Conventional Commits)
  • Pre-commit hooks with Husky for code quality
  • CI/CD pipeline with clippy, rustfmt, and security audit
  • Contributing guidelines

... (truncated)

Commits
  • 248e513 feat!: v0.2.0 — memory safety fixes, standardized error handling, 91% test co...
  • See full diff in compare view

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Updates the requirements on [tesseract-rs](https://github.com/cafercangundogdu/tesseract-rs) to permit the latest version.
- [Release notes](https://github.com/cafercangundogdu/tesseract-rs/releases)
- [Changelog](https://github.com/cafercangundogdu/tesseract-rs/blob/master/CHANGELOG.md)
- [Commits](cafercangundogdu/tesseract-rs@v0.1.20...v0.2.0)

---
updated-dependencies:
- dependency-name: tesseract-rs
  dependency-version: 0.2.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot @github
Copy link
Copy Markdown
Contributor Author

dependabot bot commented on behalf of github Mar 30, 2026

Labels

The following labels could not be found: dependencies, rust. Please create them before Dependabot can add them to a pull request.

Please fix the above issues or remove invalid values from dependabot.yml.

@cpetersen cpetersen merged commit 7acf882 into main Mar 31, 2026
1 check passed
@cpetersen cpetersen deleted the dependabot/cargo/ext/parsekit/tesseract-rs-0.2 branch March 31, 2026 06:17
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