implement new argument parser with --help support

This commit is contained in:
2025-10-21 19:12:16 -07:00
parent 2aeb0474e6
commit 5108b61a15
3 changed files with 195 additions and 79 deletions

View File

@@ -2,6 +2,8 @@
#![feature(uefi_std)]
use crate::context::{RootContext, SproutContext};
use crate::options::SproutOptions;
use crate::options::parser::OptionsRepresentable;
use crate::phases::phase;
use anyhow::{Context, Result};
use log::info;
@@ -51,7 +53,7 @@ fn main() -> Result<()> {
setup::init()?;
// Parse the options to the sprout executable.
let options = options::parser::parse().context("unable to parse options")?;
let options = SproutOptions::parse().context("unable to parse options")?;
// Load the configuration of sprout.
// At this point, the configuration has been validated and the specified