Skip to content

feat: make the tokenizers regex backend a crate feature - #359

Merged
anush008 merged 1 commit into
anush008:mainfrom
Goldziher:feat-tokenizers-regex-backend-features
Nov 22, 2026
Merged

anush008 merged 1 commit into
anush008:mainfrom
Goldziher:feat-tokenizers-regex-backend-features

Conversation

@Goldziher

Copy link
Copy Markdown
Contributor

Closes #358. As agreed there: onig stays default, so default builds are unchanged, and fancy-regex is a new opt-in.

tokenizers needs exactly one backend and picks onig when both are on, so fancy-regex only takes effect with default-features = false. Anyone already on default-features = false must now add onig or fancy-regex. CI legs pass onig explicitly, and there are new fancy-regex clippy legs plus a candle-only test leg.

Checked locally: qwen3-text and bert-text build with both backends, and cargo tree -i onig is empty under fancy-regex. Tokenization parity under fancy-regex is not tested.

Expose onig (default, unchanged behavior) and fancy-regex as features so
candle-only builds can avoid compiling the C Oniguruma library. CI legs
pass onig explicitly and add fancy-regex builds.
@greptile-apps

greptile-apps Bot commented Nov 22, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5 Tier: apex

[Medium impact] The PR appears safe to merge within its stated scope.

Reviews (2) · Last reviewed commit: "feat: make the tokenizers regex backend ..." · Reviewed by Greptile

@anush008
anush008 merged commit b8be3a0 into anush008:main Nov 22, 2026
25 checks passed
github-actions Bot pushed a commit that referenced this pull request Nov 22, 2026
## [7.8.0](v7.7.1...v7.8.0) (2026-11-22)

### 🍕 Features

* make the tokenizers regex backend a crate feature ([#359](#359)) ([b8be3a0](b8be3a0))

### 🧹 Chores

* Add crates.io keywords and categories ([#357](#357)) ([1cde83b](1cde83b))
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 7.8.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Optional fancy-regex backend for tokenizers (make onig a default feature)

2 participants