pbc 0.1.23

generate crate from protobuf / 由 protobuf 生成 rust crate ( base on pb-jelly-gen / 基于 pb-jelly-gen )
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use std::path::PathBuf;

use aok::Result;
use clap::Parser;

#[derive(Parser, Debug)]
#[command(name = "pbc", about = "protobuf to rust crate")]
struct Args {
  /// 工作目录路径
  #[arg(short = 'w', long = "workdir", default_value = ".")]
  workdir: PathBuf, // 使用 PathBuf 类型
}

fn main() -> Result<()> {
  let args = Args::parse();
  let workdir = args.workdir;
  pbc::run(workdir)
}