Announcing Nucleo: A fast fuzzy matcher library

159 points pascalkuthe

Nucleo is a fast fuzzy matcher library for rust.

The core matcher (nucleo-matcher) is significantly faster (up to 8 times faster on my system) than the fuzzy-matcher library. Furthermore, the high-level nucleo crate contains a convenient API to build a full fzf-like matcher that:

  • runs the matcher in parallel on a background thread pool and doesn't block the UI thread
  • allows fully parallel lock-free injection/streaming of inputs into the matcher

While skim was always quite a lot slower than fzf, nucleo is faster than fzf in my testing. The use case for the high-level API is "quickly plug fzf into my application" and used exactly for that purpose in the helix editor.

Nucleo integration has just been merged into helix master (in time for the upcoming release) entirely replacing our use of the fuzzy-matcher crate fixing many long-standing usability and performance problems. You can try out nucleo right now by building helix from master, starting the editor (in a large directory like your home directory), and opening the file picker with <space>f.