A two-pane GUI for filtering large text files by regex, built in Rust with egui.
┌──────────────────────────────────────────┐
│ TOP PANE — full file, all lines │ ← CentralPanel (fills space)
│ selected line highlighted in amber │
│ scrolls to center the selected line │
├──────────────────────────────────────────┤
│ 🔍 [regex input ] [Filter] [✕] │ ← fixed search bar
│ 42 matches found │
├──────────────────────────────────────────┤
│ BOTTOM PANE — matched lines only │ ← BottomPanel (resizable)
│ click any row → top pane centers it │
└──────────────────────────────────────────┘
git clone <this repo>
cd rlogg
cargo run --releaseThen: File → Open… → pick any text file → type a regex → press Enter or Filter.
- Uncomment the
large-text-coredependency inCargo.toml. - In
src/app.rs, delete the stubFileReaderstruct andimplblock. - Replace every use of
FileReaderwithlarge_text_core::FileReaderandlarge_text_core::LineIndexer. - Replace the
start_searchfunction body withlarge_text_core::SearchEngine::find_matches(reader, pattern, tx).
The channel protocol (SearchMessage::Match(line_no) / SearchMessage::Done)
stays identical — only the implementation behind it changes.
| Concept | Where |
|---|---|
egui::TopBottomPanel layout order |
app.rs update() |
Virtual scrolling with show_rows |
show_top_pane, show_bottom_pane |
mpsc channels for background threads |
poll_search_results, start_search |
| Centered scroll-to on click | top_pane_scroll_target + vertical_scroll_offset |
| Regex compilation + error handling | run_search |