Files
ncmmiao/src/clap.rs
lkhsss e7ecb37878 - 修改默认线程数为cpu核心数
- 修改多线程通信为crossbeam-channel库,增加通讯性能
 - ⬆️ 升级依赖
 - 🔨 优化解密算法,提高解密效率
2025-08-12 22:26:46 +08:00

30 lines
880 B
Rust
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

use clap::Parser;
#[derive(Parser)]
#[command(name = "ncmmiao")]
#[command(author = "lkhsss")]
#[command(version,about = "一个解密ncm文件的神秘程序 By Lkhsss", long_about = None)]
pub struct Cli {
/// 并发的最大线程数默认为cpu核心数
#[arg(short, long)]
pub workers: Option<usize>,
/// 需要解密的文件夹或文件
#[arg(short, long, name = "输入文件/目录")]
pub input: Vec<String>,
/// 输出目录
#[arg(short, long, name = "输出目录", default_value = "NcmmiaoOutput")]
pub output: String,
/// 强制覆盖保存开关
#[arg(short, long, name = "强制覆盖开关")]
pub forcesave: bool,
/// 自动打开输出目录
#[arg(short, long, name = "自动打开输出目录")]
pub autoopen: bool,
#[arg(short, long, action = clap::ArgAction::Count)]
pub debug: u8,
}