DemesneGH commented on PR #263:
URL: 
https://github.com/apache/teaclave-trustzone-sdk/pull/263#issuecomment-3727728182

   @asir66 Thanks for your effort!
   I've checked the implementation in `cargo-sgx`:
   ```
   #[derive(Debug, Parser)]
   #[clap(bin_name = "cargo")]
   #[clap(version = VERSION)]
   pub(crate) enum Opts {
       /// Utilities to build sgx program.
       #[clap(name = "sgx")]
       #[clap(version = VERSION)]
       #[clap(action = ArgAction::DeriveDisplayOrder)]
       Sgx(SgxArgs),
   }
   
   #[derive(Debug, clap::Args)]
   pub(crate) struct SgxArgs {
       #[clap(subcommand)]
       cmd: Command,
   }
   
   #[derive(Debug, clap::Subcommand)]
   enum Command {
       #[clap(name = "build")]
       Build(BuildCommand),
       #[clap(name = "run")]
       Run(RunCommand),
   ...
   }
   ```
   It seems `cargo-sgx` only supports being invoked as cargo-sgx sgx xxx and 
doesn't support the two scenarios.
   
   Could you help with a brief study of how other cargo subcommands handle this 
case?
   
   To achieve the goal of "cargo-optee acting as a cargo subcommand," it's good 
to follow the established principles used by other subcommands. If there is a 
standard convention, we can implement it in the same way; otherwise, the 
current implementation is fine.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to