Expand description
nucleo is a high level crate that provides a high level matcher API that
provides a highly effective (parallel) matcher worker. It’s designed to allow
quickly plugging a fully featured (and faster) fzf/skim like fuzzy matcher into
your TUI application.
It’s designed to run matching on a background threadpool while providing a snapshot of the last complete match. That means the matcher can update the results live while the user is typing while never blocking the main UI thread (beyond a user provided timeout). Nucleo also supports fully concurrent lock-free (and wait-free) streaming of input items.
The Nucleo struct servers as the main API entrypoint for this crate.
§Status
Nucleo is used in the helix-editor and therefore has a large user base with lots
or real world testing. The core matcher implementation is considered complete
and is unlikely to see major changes. The nucleo-matcher crate is finished and
ready for widespread use, breaking changes should be very rare (a 1.0 release
should not be far away).
While the high level nucleo crate also works well (and is also used in helix),
there are still additional features that will be added in the future. The high
level crate also need better documentation and will likely see a few minor API
changes in the future.
Modules§
Structs§
- Config
- Configuration data that controls how a matcher behaves
- Injector
- A handle that allows adding new items to a
Nucleoworker. - Item
- A match candidate stored in a
Nucleoworker. - Match
- An item that was successfully matched by a
Nucleoworker. - Matcher
- A matcher engine that can execute (fuzzy) matches.
- Nucleo
- A high level matcher worker that quickly computes matches in a background threadpool.
- Snapshot
- A snapshot represent the results of a
Nucleoworker after finishing atick. - Status
- That status of a
Nucleoworker after a match.
Enums§
- Utf32
Str - A UTF32 encoded (char array) string that is used as an input to (fuzzy) matching.
- Utf32
String - An owned version of
Utf32Str.