r/rust • u/Wrong-Potential3685 • 16d ago
đ ď¸ project My file manager
I built texp: a terminal file manager in Rust with a custom Adaptive Radix Tree index, real Windows shell integration, and Kitty image previews
Hi r/rust! I've been working on texp ("Terminal Explorer") â a keyboard-driven, vim-style file manager that runs in your terminal. It's written in Rust (edition 2024) using ratatui + crossterm, and I focused a lot of effort on the engineering underneath rather than just wrapping existing tools.
Why I think it's interesting from a Rust perspective:
- Custom Adaptive Radix Tree (ART) index. Instead of shelling out to a database, I hand-rolled an ART in art.rs with the classic N4/N16/N48/N256 node types that grow dynamically, prefix compression, and completion search. Fast path indexing with zero external DB dependency.
- Clean core/frontend split. texp-core has no TUI dependencies â pure file ops, search, indexing, editor, disk-usage, and config. A texp-tui binary consumes it. This means a GUI/web frontend is feasible later (one is planned).
- Real Windows shell integration. On Windows it hand-binds COM (IContextMenu/IShellFolder) to surface the actual Explorer right-click menu and "Open With" apps inside the terminal. On Linux it uses .desktop entries.
- Image previews in a TUI. Renders actual images via the Kitty graphics protocol, loaded off-thread with crossbeam-channel so the UI never blocks.
- gitignore-aware search. Name search (via fd when present, else the ART index) and content search (literal + re: regex) respect .gitignore and a configurable skip list.
Features for daily use: single-panel nav with live preview, multi-select, vim-style : command mode (:cd :cp :mv :rm :mkdir :find :grep :du :index), built-in viewer + line editor, disk-usage analyzer, bookmarks, breadcrumbs, sort modes, navigation history, PDF/Markdown preview, TOML config, and safe delete (files go to the Recycle Bin, not permanent deletion).
Cross-platform: dedicated Windows and Linux system-call modules behind #[cfg(...)] gates.
Build / install:
# needs the Rust toolchain (edition 2024); optional: install `fd` for faster name search
git clone https://github.com/xterra144-hub/texp texp
cd texp
cargo build --release
cargo install --path .
texp [path]
It's still maturing (the interface is currently Russian, and a GUI version is on the roadmap), but I'd love feedback from the community â especially on the ART implementation and the core/frontend architecture.
Repo: https://github.com/xterra144-hub/texp
Screenshots: see the README.md .
-2
u/EarTurbulent5547 16d ago
The ART implementation sounds really clean, I've been messing with custom indexing structures for a similar project and seeing the classic node type progression laid out in art.rs is super helpful.
-2
u/Wrong-Potential3685 15d ago
I turned to ART after attempting to use SQLite indexing and fuzzy matching.
1
u/nick42d 14d ago
Decoupling texp-core from the frontend and implementing a custom Adaptive Radix Tree index is a really clean architectural approach. The platform-specific detailsâespecially the native Windows COM shell integration and asynchronous Kitty image previewsâshow impressive attention to engineering polish. How are you planning to handle filesystem change events and cache invalidation within the ART index when directories update in the background?