1#![doc = include_str!("../README.md")]
16#![deny(missing_docs)]
17#![deny(rustdoc::broken_intra_doc_links)]
18#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
19
20mod commands;
21mod utils;
22
23use clap::{Args, Parser, Subcommand};
24
25use self::commands::{
26 bake::BakeCommand, build::BuildCommand, build_toolchain::BuildToolchainCommand,
27 install::InstallCommand, new::NewCommand, verify::VerifyCommand,
28};
29
30#[derive(Parser)]
31#[command(name = "cargo", bin_name = "cargo")]
32pub enum CargoCli {
34 Risczero(RisczeroArgs),
36}
37
38#[derive(Args)]
39#[command(author, version, about, long_about = None)]
40#[non_exhaustive]
41pub struct RisczeroArgs {
43 #[command(subcommand)]
44 pub command: Commands,
46}
47
48#[derive(Subcommand)]
49#[non_exhaustive]
50pub enum Commands {
52 Bake(BakeCommand),
54
55 Build(BuildCommand),
57
58 BuildToolchain(BuildToolchainCommand),
60
61 #[cfg(feature = "experimental")]
63 Guest(commands::guest::GuestCommand),
64
65 Install(InstallCommand),
67
68 New(NewCommand),
70
71 Verify(VerifyCommand),
73}
74
75#[cfg(test)]
76mod tests {
77 use clap::CommandFactory;
78
79 use super::*;
80
81 #[test]
82 fn verify_app() {
83 CargoCli::command().debug_assert();
84 }
85}