refactor fayalite::cli to expose subcommands
Some checks failed
/ test (push) Failing after 13m29s

This commit is contained in:
Jacob Lifshay 2024-07-22 01:41:45 -07:00
parent 37d03cec33
commit 0edf380c79
Signed by: programmerjake
SSH key fingerprint: SHA256:B1iRVvUJkvd7upMIiMqn6OyxvD2SgJkAH3ZnUOj6z+c
2 changed files with 117 additions and 41 deletions

View file

@ -1,5 +1,6 @@
use clap::Parser;
use fayalite::{
cli,
clock::{Clock, ClockDomain},
hdl_module,
int::{DynUInt, DynUIntType, IntCmp, IntTypeTrait, UInt},
@ -41,10 +42,10 @@ struct Cli {
#[arg(long, default_value = "1000000", value_parser = clap::value_parser!(u64).range(2..))]
clock_frequency: u64,
#[command(subcommand)]
cli: fayalite::cli::Cli,
cli: cli::Cli,
}
fn main() {
fn main() -> cli::Result {
let cli = Cli::parse();
cli.cli.run(blinky(cli.clock_frequency))
}