Skip to content

Migrate legacy shell functionality into Rust and remove uki-setup.sh - #25

Merged
GlitchSlayed merged 3 commits into
mainfrom
codex/verify-implementation-of-bash-script-in-rust-91qwn2
Mar 13, 2026
Merged

GlitchSlayed merged 3 commits into
mainfrom
codex/verify-implementation-of-bash-script-in-rust-91qwn2

Conversation

@GlitchSlayed

Copy link
Copy Markdown
Owner

Motivation

  • Consolidate the remaining behavior from the legacy uki-setup.sh into the Rust CLI so the project is maintained in one codebase.
  • Preserve the shell flow: cmdline detection/sanitization, installed-kernel discovery, and stale-UKI pruning while improving safety and testability in Rust.

Description

  • Add a new kernel module (src/kernel.rs) implementing list_installed_kernels, sanitize_cmdline, resolve_cmdline, and prune_stale_uki_artifacts to mirror the legacy script logic in Rust.
  • Wire cmdline resolution and stale-UKI pruning into the Rust pipeline by using resolve_cmdline in generate and invoking prune_stale_uki_artifacts during install in src/app.rs.
  • Extend configuration with configured_cmdline and auto_detect_cmdline (defaults and TOML parsing) in src/config.rs and surface them in the README config reference.
  • Update integration tests (tests/integration_cli.rs) to cover cmdline sanitization/resolution and stale-UKI pruning, add src/kernel.rs, and remove the legacy uki-setup.sh and its shell test harness (tests/test_uki_setup.sh).

Testing

  • Ran cargo fmt to format the code successfully.
  • Ran cargo test and all tests passed (unit + integration suites completed successfully).

Codex Task

@GlitchSlayed
GlitchSlayed merged commit bca0dea into main Mar 13, 2026
0 of 3 checks passed
@GlitchSlayed
GlitchSlayed deleted the codex/verify-implementation-of-bash-script-in-rust-91qwn2 branch March 19, 2026 02:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant