Add base sdk

This commit is contained in:
2023-01-27 08:31:09 +01:00
commit 078e2d9c2c
9 changed files with 1527 additions and 0 deletions

22
src/cli.rs Normal file
View File

@@ -0,0 +1,22 @@
pub struct Cli {
cmd: clap::Command,
}
impl Cli {
pub fn new() -> eyre::Result<Self> {
Ok(Self {
cmd: clap::Command::new("dagger-rust")
.subcommand_required(true)
.subcommand(clap::Command::new("generate")),
})
}
pub fn execute(self, args: &[&str]) -> eyre::Result<()> {
let matches = self.cmd.get_matches_from(args);
match matches.subcommand() {
Some(("generate", args)) => Ok(()),
_ => eyre::bail!("command missing"),
}
}
}