10 Commits

Author SHA1 Message Date
4fu 65832db6d8 feat(python): add PyO3-based Python bindings (#600)
* feat(python): migrate Python bindings from ctypes to PyO3

- Add native PyO3 extension in crates/fff-python
- Replace ctypes wrapper with maturin-built package in packages/fff-python
- Expose FileFinder, search/glob/directory/mixed/grep APIs and result types
- Use PyPI package name fff-python (import name remains fff)
- Update workspace Cargo.toml/Cargo.lock and .gitignore for Python artifacts

* ci: add Python CI workflow and release wheel builds

- Add .github/workflows/python.yml to test bindings on Ubuntu/macOS/Windows
- Extend release.yaml with Python wheel builds (x86_64/aarch64) and sdist
- Add optional PyPI publish job using trusted publishing

* fix(python): address review feedback and release CI

Rust bindings:

- Release GIL during heavy search/grep operations via py.allow_threads

- Add MixedFileItem/MixedDirItem::from_core to avoid double-cloning

- Return PyDict directly from health_check and drop serde_json dependency

- Call destroy() in __exit__ so the context manager releases resources

- Add mode parameter to multi_grep for parity with grep

- Preserve cache budget overrides across reindex()

- Rename combo_boost param to match FuzzySearchOptions field

Docs/tests:

- Update Python test for dict-returning health_check

- Add Python bindings section to main README

CI:

- Fix pypi-publish job to depend on build-python/build-python-sdist

  instead of release, making the workflow_dispatch checkbox functional

* fix(python): sync release versions and expand tests

* refactor(python): split lib.rs and improve Pythonic API

- Split crates/fff-python/src/lib.rs into modules:
  - types.rs: all pyclass result types
  - finder.rs: FileFinder implementation
  - conversions.rs: From/core conversions

- Make API more Pythonic:
  - FileFinder now accepts pathlib.Path / os.PathLike for base_path and reindex
  - Add close() alias for destroy()
  - grep/multi_grep now raise FFFException for invalid modes
  - GrepResult gains has_more property and next_cursor() method

- Add type stubs:
  - packages/fff-python/src/fff/__init__.pyi
  - packages/fff-python/src/fff/py.typed

- Add __repr__ implementations for all exposed pyclasses

- Expand Python tests for pathlib, close(), reprs, invalid mode, and cursor pagination

* fix(python): align type stubs and runtime API

* refactor(python): polish binding API and GIL handling

Make the Python binding API more idiomatic before merge: replace getter-style methods with properties, keep close() as the single explicit shutdown API, add container semantics for result objects, and tighten type stubs with Literal/Sequence/PathLike support.

Also reduce Rust binding duplication with shared option/result helpers and release the Python GIL around blocking filesystem, git, and query-history operations.

* feat(python): async wait_for_scan with blocking variant

* fix(python): consistent frecency type and combo defaults matching node

* fix(python): health_check defaults to indexed path and reports cwd errors; expand readme

* chore(python): rename pypi distribution to fff-search

* chore(python): align version to 0.9.4 for unified release

* chore(release): bump python version with sed instead of inline python

* refactor(python): use From trait for core type conversions

* chore: do not run full prebuild of python wheels on PR

---------

Co-authored-by: Dmitriy Kovalenko <dmtr.kovalenko@outlook.com>
2026-06-16 18:06:42 -07:00
Dmitriy Kovalenko 6d5576e90e fix: bun --compile problem (#586) 2026-06-09 15:31:27 -07:00
Dmitriy Kovalenko b5a7967fd2 feat(lua): Add programmatic api for lua (#514)
* feat(lua): Add programmatic api for lua

* fix(lua): Resolve CI lint errors

- main.lua: drop duplicate `open_file_under_cursor` impl,
  superseded by the path-resolving variant
- picker_ui.lua: replace undefined `canonicalize_fff_path`
  with `utils.canonicalize_picker_path`
- programmatic_search_spec.lua: cast `hit` to non-nil after
  the `assert.is_not_nil` so lua-ls stops flagging the
  follow-up field accesses
2026-05-22 09:17:30 -07:00
Dmitriy Kovalenko 1bcbce2bc6 feat: Improve stability of file search discovery in background (#431)
* feat: Improve scan runtime performance and RSS

* chore: Comprehensive randomized fuzzy mutation testing

It's such a shame that we keep commiting regressions that are leading ot
the missed events from the file watcher. I want to minimize this to 0.

* chore: Update docs for - chore: Comprehensive randomized fuzzy mutation testing

* chore: Update docs for - chore: Update docs for - chore: Comprehensive randomized fuzzy mutation testing

* test: Verbose stress test output
2026-05-02 09:28:14 -07:00
Dmitriy Kovalenko cebacb3c35 feat!: Revamp & optimize the way strings are stored in RAM (#387)
* wip: Paths and dirs

* feat: att 2

* final changes

* feat!: Revamp & optimize the way paths are stored

This is a very crucial redesign that actually required a lot of
consideration to move forward but now it allows us to save a lot of RAM,
acutally improves query time and gives an ability to query directories
for free

* fix: Wrong pointer

* chore: Update docs for - fix: Wrong pointer

* fix: notify debouncer on macos

* get rid of flienma_ptrs juggling

* consolidate arena/picker via pub trait
2026-04-17 22:51:31 -07:00
Dmitriy Kovalenko d54b17ba81 perf: SIMD optimized perfilter for grep (#318)
* perf: SIMD optimized perfilter for grep

* chore: Update docs for - perf: SIMD optimized perfilter for grep
2026-04-01 14:50:48 -07:00
Dmitriy Kovalenko 371d54a478 perf: Optimize filename bonus scoring (#316)
* perf: Optimize filename bonus scoring

* iter 2

* chore: Update docs for - iter 2
2026-03-31 10:28:06 -07:00
Dmitriy Kovalenko 736c41ecd6 feat: MCP (#272)
* feat: MCP

* chore: Update docs for - feat: MCP

* feat: Perf optimizations

* chore: Update docs for - feat: Perf optimizations
2026-03-11 21:27:11 -07:00
Dmitriy Kovalenko 9edf195c8f feat: Significant performance improvements up to +190% (#182) 2025-12-05 23:44:14 -08:00
Dmitriy Kovalenko 198ab9430a Initial commit 2025-08-02 00:30:34 +02:00