#![doc(html_favicon_url = "https://raw.githubusercontent.com/zng-ui/zng/main/examples/image/res/zng-logo-icon.png")]
#![doc(html_logo_url = "https://raw.githubusercontent.com/zng-ui/zng/main/examples/image/res/zng-logo.png")]
#![doc = include_str!(concat!("../", std::env!("CARGO_PKG_README")))]
#![warn(unused_extern_crates)]
#![warn(missing_docs)]
#[macro_use]
mod util;
mod fmt;
mod l10n;
mod new;
mod res;
pub mod res_tool_util {
pub use crate::res::built_in::{
display_path, path, ZR_APP, ZR_CACHE_DIR, ZR_CRATE_NAME, ZR_DESCRIPTION, ZR_FINAL, ZR_HELP, ZR_HOMEPAGE, ZR_LICENSE, ZR_ORG,
ZR_PKG_AUTHORS, ZR_PKG_NAME, ZR_QUALIFIER, ZR_REQUEST, ZR_REQUEST_DD, ZR_SOURCE_DIR, ZR_TARGET, ZR_TARGET_DD, ZR_TARGET_DIR,
ZR_VERSION, ZR_WORKSPACE_DIR,
};
}
use clap::*;
#[derive(Parser)] #[command(name = "cargo")]
#[command(bin_name = "cargo")]
enum CargoCli {
Zng(Zng),
}
#[derive(Args, Debug)]
#[command(author, version, about, long_about = None)]
#[command(propagate_version = true)]
struct Zng {
#[command(subcommand)]
pub command: Command,
}
#[derive(Subcommand, Debug)]
enum Command {
Fmt(fmt::FmtArgs),
New(new::NewArgs),
L10n(l10n::L10nArgs),
Res(res::ResArgs),
}
fn main() {
res::built_in::run();
let CargoCli::Zng(cli) = CargoCli::parse();
match cli.command {
Command::Fmt(args) => fmt::run(args),
Command::New(args) => new::run(args),
Command::L10n(args) => l10n::run(args),
Command::Res(args) => res::run(args),
}
crate::util::exit();
}