Nucleo fuzzy matching for Rust applications
A fast and convenient fuzzy matcher library for rust
At a glance
- What is it?
- Nucleo is a Rust library for ranking and filtering text with an fzf-style scoring model. It is aimed at applications that need low-selectivity fuzzy searches, especially over large collections, rather than users looking for a standalone terminal picker.
- Who is it for?
- Nucleo is a good fit for Rust developers embedding fuzzy ranking in an editor, picker, or large searchable collection, especially when matching and ranking can be separated. It is the wrong dependency for someone expecting a ready-made CLI, and adopters should first verify the intended `nucleo` or `nucleo-matcher` API, Unicode behavior, current release status, and their ability to tolerate documented high-level API changes.
- Can I use it commercially?
- Yes, with conditions. MPL-2.0 is a weak copyleft licence: you can use it inside commercial and closed-source software, but if you distribute changes to its own files, you must publish those changes under the same licence.
- Is it still maintained?
- Yes. The repository last received commits 121 days ago.
- What is it written in?
- Mainly Rust, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on October 23, 2026, and from our analysis. They are not legal advice.
Editorial analysis
Why Nucleo targets embedded fuzzy search
Nucleo addresses the need to filter and rank large collections of text as a user types. Its intended use case overlaps with `fzf` and `skim`, but the deliverable is a Rust library rather than a completed terminal user interface. This distinction matters when choosing a dependency. A program that needs command-line file selection may want an application, while Helix and similar software need matching logic that can be integrated into an existing interface.
The README highlights a particular weak point in many fuzzy matchers: patterns with low selectivity. A short or common pattern can match a large fraction of the candidate set, forcing the matcher to examine and score many items after each input change. Nucleo is designed to keep that path efficient and is used by helix-editor. The repository also includes matcher microbenchmarks, although the README labels them work in progress rather than a comprehensive suite.
There are two APIs with different adoption boundaries. The high-level `nucleo` crate provides managed fuzzy-picker behavior. Developers replacing the `fuzzy-matcher` crate are directed to `nucleo-matcher`, which exposes the matching layer without the managed picker. That separation makes it possible to integrate ranking without adopting every part of Nucleo's higher-level workflow.
Smith-Waterman ranking and Unicode graphemes
Nucleo uses the same scoring system as `fzf`, according to the README. That compatibility gives developers familiar with `fzf` a useful baseline for ranking behavior. The matching algorithm is based on Smith-Waterman with affine gaps, a method originally developed for DNA and RNA sequence alignment. The project implements the algorithm with two matrices so it can find the optimal alignment more faithfully than implementations that use a single matrix.
The README gives the sequence `xf foo` as an example. For the pattern `foo`, it says Nucleo selects `x__foo`, while `fzf` selects `xf_oo`. Both results contain the requested characters, but the first keeps that contiguous word intact, which is the ranking Nucleo considers more intuitive. This is a claim about the implementations and documented example, not a universal guarantee that every ordering will match another fuzzy matcher.
Unicode handling is another technical distinction. The README says `fzf` and `skim` operate on Unicode code points, while Nucleo handles Unicode graphemes more correctly. For a multi-code-point grapheme, matching uses the grapheme's first code point and reports grapheme indices so an interface can highlight matched positions. The README also states that Nucleo's case-insensitive behavior and bonus handling work beyond ASCII, while the corresponding systems in `skim` are limited to ASCII. These properties matter for search over names, file paths, identifiers, and prose containing accented or composed characters.
Row-based matching and streaming architecture
The implementation is designed to avoid storing a full alignment matrix during ordinary matching and ranking. Smith-Waterman with affine gaps normally uses separate matrices for different match states. Nucleo precomputes the next row of one matrix, allowing the other matrix's value to be retained in a variable while the algorithm iterates. Only the current row is kept because it simultaneously serves as the next iteration's row.
Calculating match indices is different. Backtracking requires a full matrix, but Nucleo does not store numeric matrices for that phase. It records only two booleans indicating where each traversal came from. This keeps index calculation separate from the memory-efficient filtering path.
The active row is narrower than the full candidate length. The README describes a width of `n-m+1`, based on the observation that certain characters before and after a pattern position can never match the current character. The project documentation also describes lock-free, multithreaded streaming as an implementation capability. The main `Cargo.toml` includes `rayon` and `parking_lot`, while the workspace separates the matcher into the `matcher` directory. The README does not provide a complete application-level streaming example, so the exact producer API would need to be confirmed in the crate documentation or source before integration.
Installing Nucleo and choosing the correct crate
The README does not provide installation commands, a `cargo add` example, or a first-use program. It points developers who want a `fuzzy-matcher` replacement to the `nucleo-matcher` crate, while the repository's `Cargo.toml` identifies the high-level package as `nucleo`. No installation block is included here because the README does not state the exact registry version or setup sequence.
For an application that needs the managed picker described by the README, the starting point is the high-level `nucleo` crate. For an application that only needs matching and ranking primitives, the README explicitly directs developers to `nucleo-matcher`. The workspace manifest records the high-level package at version `0.5.0` and declares `nucleo-matcher` at version `0.3.1` with a local path. That is repository configuration, not confirmation of which version is currently published to crates.io.
A first real use therefore begins by selecting the API boundary, adding the intended published crate to the consuming Rust project, and consulting that crate's API for collection setup, case options, matching, ranking, and result retrieval. The README does not show the constructors or methods needed to write a verified example. It would be misleading to invent those calls. Readers who need a command-line picker immediately should also note that a standalone CLI remains listed as future work.
Benchmark evidence and its boundaries
The README reports substantially lower runtimes for Nucleo than `skim` in its matcher microbenchmarks. The test description says it matches patterns against files in the Linux kernel source and gives this repository command:
BENCHMARK_DIR=<path_to_linux> cargo run -p benches --releaseThe command allows an empty `BENCHMARK_DIR`, in which case the benchmark code clones the kernel automatically according to the README. The results shown include patterns such as `"never_matches"`, `"copying"`, `"/doc/kernel"`, and `"//.h"`. Across those examples, the displayed Nucleo mean times range from 2.12 ms to 9.53 ms, while the displayed `skim` times range from 16.85 ms to 35.46 ms. The README also states that Nucleo is often around six times faster than `skim`, but this is explicitly tied to the project's examples rather than a universal result.
The separate `fzf` comparison uses a screencast with roughly three million items and a `///.` pattern. The README reports about one second for `fzf` and about one thirtieth of a second for Nucleo on a Ryzen 5950x, while warning that other hardware may behave differently. It also says scientific comparisons with `fzf` are missing because `fzf` cannot be called as a library. These figures are useful for understanding the intended workload, but they are not portable service-level targets.
Maintenance, releases, and upgrade boundaries
The repository is not archived, and its last push was on 2026-06-24. The project is also used by helix-editor, which gives the matcher real integration within an editor, although that alone does not guarantee compatibility for every downstream crate.
The release history lists `nucleo-v0.4.0` on 2024-02-20, `nucleo-v0.3.0` on 2023-12-22, and `nucleo-v0.2.1` on 2023-09-02. The current repository manifest declares version `0.5.0`, so the checked-in source and the listed release history are not aligned. That discrepancy should be checked against the published crate and changelog before pinning a dependency.
The README characterizes the core matcher as complete and unlikely to receive major changes. It describes `nucleo-matcher` as finished, with breaking changes expected to be rare. The high-level crate has a different status: its documentation needs improvement and API changes remain possible. That is a meaningful upgrade boundary. Applications needing stable primitives may have a narrower adoption surface than applications depending on the managed picker API.
The project is licensed under `MPL-2.0`. The repository contains `LICENSE`, `CHANGELOG.md`, and the workspace manifest, but the README does not provide legal interpretation of obligations for a particular distribution model.
When fzf, skim, or fuzzy-matcher fits better
`fzf` is the clearer alternative when the requirement is an interactive terminal fuzzy picker rather than an embedded Rust library. It is presented in the README as the closest functional comparison and already has a standalone command-line workflow. Nucleo does not currently claim feature parity: `--no-sort`, `--tac`, columnar matching, and a standalone CLI are listed under future work.
`skim` is another practical alternative for a standalone or library-oriented fuzzy search workflow. The README says Nucleo uses a more consistent bonus system, offers stronger non-ASCII handling, and has a performance advantage in its benchmark examples. That does not make Nucleo universally preferable. An application that only needs ranking primitives should compare `nucleo-matcher` with `fuzzy-matcher`, since the README explicitly distinguishes those use cases.
The main wrong-tool case is a deployment that expects `nucleo` to behave like a finished command. Its high-level crate is a library, and the standalone executable is still future work. The other clear boundary is API stability: teams that cannot tolerate planned high-level API changes should first assess whether `nucleo-matcher` covers their actual requirements.
Editorial conclusion
Nucleo is a good fit for Rust developers embedding fuzzy ranking in an editor, picker, or large searchable collection, especially when matching and ranking can be separated. It is the wrong dependency for someone expecting a ready-made CLI, and adopters should first verify the intended `nucleo` or `nucleo-matcher` API, Unicode behavior, current release status, and their ability to tolerate documented high-level API changes.
Frequently asked questions
Is Nucleo a standalone fzf replacement or a Rust library?
Nucleo is a Rust library intended for applications such as Helix. The README says it fills the same use case as `fzf` and `skim`, but a standalone CLI and feature parity with `fzf` are listed as future work.
Should I use nucleo or nucleo-matcher in Rust?
Use the high-level `nucleo` crate when you need the managed fuzzy-picker behavior. The README specifically directs developers replacing `fuzzy-matcher` and seeking only matching functionality to `nucleo-matcher`.
How does Nucleo handle Unicode fuzzy matching?
The README says Nucleo handles Unicode graphemes more correctly than matchers operating directly on code points. It matches using the first code point of a grapheme and reports grapheme indices for highlighting, and it says case-insensitive matching and bonuses are not limited to ASCII.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/helix-editor-nucleo)Was this useful?