Part of Ferramenta, a family of Rust tools.
Ferroni — Oniguruma's regex engine, modernized in Rust
Oniguruma-compatible regex matching and scanning in pure Rust. Ferroni ports Oniguruma's parser, compiler and optimizer line by line, verifies UTF-8 behavior against the upstream test suite, and adds an idiomatic Rust API. No C compiler or bindgen required.
Use it for TextMate grammars, patterns with look-around or backreferences, or replacing C Oniguruma in a Rust application.
Explore Ferroni → — matching examples, a visual scanner walkthrough, compatibility evidence and measured performance.
Quick start
use *;
Scope and safety
Ferroni supports ASCII and UTF-8. Other encodings and the POSIX/GNU APIs are outside its scope. It uses backtracking: set timeouts and retry limits for untrusted patterns or input. See compatibility and untrusted input.
When your patterns fit Rust's regex
crate, prefer its guaranteed linear-time matching.
Documentation
- Getting started — captures, iteration, options, errors and the Scanner API.
- API reference — every public type and function.
- Benchmarks — workloads, comparison engines, measurement conditions and raw data.
- Migrating to 2.0 — breaking changes with before and after code.
Project status and contributing
Ferroni is feature-complete for its scope and maintained, with no feature work planned. Bug fixes, Unicode updates, toolchain upkeep and security fixes continue. See the project status for maintenance scope and contribution opportunities.
CONTRIBUTING.md covers builds, tests and benchmarks; architecture decisions define the port's constraints. Report vulnerabilities privately as described in SECURITY.md.
Acknowledgments and license
Built on K. Kosako's Oniguruma and Microsoft's vscode-oniguruma Scanner API and tests. Ferroni is an independent continuation and is not affiliated with or endorsed by Oniguruma's original author.
BSD-2-Clause, inherited from the Oniguruma source this port is based on.
More from Ferramenta
Ferramenta — A family of Rust tools.
Engines
| Tool | Job |
|---|---|
| ferriki | Shiki-compatible syntax highlighting |
| ferromark | Markdown to HTML, sanitized by default |
| ferrolex | Spell checking for text and code |
| ferrocat | Translation catalog engine |
| ferralk | Glob matching and parallel filesystem walking |
| ferrugo | PDF previews for untrusted files |
Applications
| Tool | Job |
|---|---|
| palamedes | Internationalization for TypeScript applications |
| dalo | Your team's agent setup, versioned like code |