linutil icon indicating copy to clipboard operation
linutil copied to clipboard

refactor: Split linutil into TUI and Core crates

Open lj3954 opened this issue 5 months ago • 5 comments

Pull Request

Title

Split linutil into TUI and Core crates

Type of Change

  • [x] Refactoring

Description

Restructure linutil from one crate containing all logic and scripts into two crates, along with a separate tabs directory to contain all data previously housed in src/commands/. Temporary directories are also entirely handled within the core crate, since they're not used anywhere else (since #153, script paths have been absolute).

Testing

Linutil TUI builds and functions correctly. The core crate is correctly rebuilt upon any modification to the tabs directory.

Impact

Future contributions should be simplified, since the project is structured more clearly. Additional UIs can be added (e.g. #248) without binary bloat or build flags that heavily complicate the codebase.

Despite the appearance of large changes, current PRs should be mostly compatible with this. The only major changes are to Cargo.toml files, most of everything else is just moved to other directories.

  • Closes #272 (includes modified opt-level)

Checklist

  • [x] My code adheres to the coding and style guidelines of the project.
  • [x] I have performed a self-review of my own code.
  • [x] I have commented my code, particularly in hard-to-understand areas.
  • [x] My changes generate no errors/warnings/merge conflicts.

lj3954 avatar Sep 06 '24 00:09 lj3954