cargo build # debug (faster iteration)
cargo run # run debug build
cargo check # quick compile check
cargo test
cargo fmt
cargo clippyarchinstall-rs/
├── src/
│ ├── main.rs # Entry point
│ ├── lib.rs
│ ├── runner.rs # TUI run loop and helpers
│ ├── app/ # Installation sections and install flow
│ │ ├── install/ # Flow builder and install UI
│ │ ├── config/ # TOML save/load/types and summary view
│ │ └── *.rs # Screens (disks, bootloader, etc.)
│ ├── common/ # Shared UI utilities and popups
│ ├── core/ # Core plumbing and services
│ │ ├── services/ # partitioning, mounting, bootloader, ...
│ │ ├── storage/ # StoragePlan / planner (partition + mount + fstab)
│ │ └── state.rs # Global app state
│ ├── input/ # Input handling (screens, popups, cmdline)
│ └── render/ # Rendering (sections, popups, theme)
├── assets/
│ └── limine/ # Limine assets (experimental)
├── boot.sh # Minimal GUI bootstrap helper
├── run-tui.sh # Wrapper to launch prebuilt binary in a terminal
├── configs/examples/ # Portable TOML presets (locales + popular stacks; manifest.toml)
├── Cargo.toml
└── README.md
Save/load in the TUI reads and writes archinstall-rs.config.toml in the current working directory (often gitignored if you keep a local copy).
- Modularity: Each installation section is its own module where practical.
- Separation of concerns: UI, orchestration, and data stay distinct.
- Type safety: Prefer encoding invariants in types.
- Errors: Surface actionable messages in the TUI where possible.
-
Screen type
Add a variant toScreeninsrc/core/types.rs(and aPopupKind::...variant if you add popups). -
Menu and state
Insrc/core/state.rs, add aMenuEntryfor the new screen inAppState::new()and any per-screen fields onAppState. -
Renderer
Addsrc/app/my_feature.rswith something likepub fn draw_my_feature(frame: &mut Frame, app: &mut AppState, area: Rect)and route it fromsrc/render/sections/content.rs. -
Info panel (optional)
Extendsrc/render/sections/info.rsfor summary text when the screen is active. -
Input
Addsrc/input/screens/my_feature.rswith handlers (move_*,change_*,handle_enter_*), export insrc/input/screens/mod.rs, and wiresrc/input/screens/dispatcher.rs(move_screen_up/down,change_value,handle_enter). -
Popups (optional)
Add helpers insrc/common/popups.rsand handle selections inapply_popup_selection. Prefersrc/render/popup/general.rsor add a focused renderer undersrc/render/popup/. -
Persistence (optional)
Extendsrc/app/config/types.rs,src/app/config/io.rs, andsrc/app/config/view.rsfor save/load and summary. -
Install plan (optional)
Add a service undersrc/core/services/if system changes are required, and extendsrc/app/install/flow.rs(build_install_plan) at the right stage. -
Tests and docs
Add tests where feasible and update user-facing docs underDocuments/when behavior changes.
See CONTRIBUTING.md for workflow, PR expectations, and code style.