Menu ▾ ▴

#47 Split lib.rs (3.3k lines) into modules

closed
nobody
2026-07-04
2026-07-03
Anonymous
No

Originally created by: kristofferR

`src-tauri/src/lib.rs` is 3,265 lines with 70+ `#[cfg]` attributes interleaved with cross-platform logic. Pure refactor along the seams that already exist:

`settings.rs`, `tray.rs`, `menu.rs`, `notifications.rs`, `download.rs`, `url_rules.rs`, `preflight.rs`, and a `macos/` submodule for the objc2 code (~40% of the cfg blocks). Move the ~626-line test module alongside the code it tests.

No behavior change. Must merge after the currently open PRs to avoid conflict hell.

Related

Tickets: #59
Tickets: #65

Discussion

  • Anonymous

    Anonymous - 2026-07-04

    Originally posted by: kristofferR

    Done in [#65]: lib.rs went from ~3,600 lines to 418 across 15 modules (largest 452), code moved verbatim with only visibility/use plumbing, all 60 tests preserved. Redone on top of the merged feature PRs so nothing had to rebase around it.

     

    Related

    Tickets: #65

  • Anonymous

    Anonymous - 2026-07-04

    Ticket changed by: kristofferR

    • status: open --> closed
     

Log in to post a comment.