首先,在Cargo.toml文件中,添加相关依赖:然后,在main.rs添加处理命令行解析的相关代码:代码说明:必须利用 use clap::Parser;may not be used on the stable release channel。