From 53bbc022a35e3ac76dd409927104f019a61b331e Mon Sep 17 00:00:00 2001 From: Alex Page Date: Sat, 24 Jun 2023 15:52:32 -0400 Subject: [PATCH 1/2] Optimize for filesize in release mode --- Cargo.toml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index aeeec04..e6c9538 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,7 +7,11 @@ crate-type = ["lib"] [[bin]] name = "xpkey" -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html +[profile.release] +strip = true +opt-level = "z" +lto = true +codegen-units = 1 [dependencies] anyhow = "1.0.71" From fe98c451f01024ef67671199d3308c078c1c33ed Mon Sep 17 00:00:00 2001 From: Alex Page Date: Sat, 24 Jun 2023 15:53:56 -0400 Subject: [PATCH 2/2] Use name for confid --- src/bin/xpkey/main.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/bin/xpkey/main.rs b/src/bin/xpkey/main.rs index 1ea3bfd..0b97fd6 100644 --- a/src/bin/xpkey/main.rs +++ b/src/bin/xpkey/main.rs @@ -32,7 +32,8 @@ enum Commands { /// Validate a product key Validate(ValidateArgs), /// Generate a phone activation Confirmation ID from an Installation ID - Confid(ConfirmationIdArgs), + #[command(name = "confid")] + ConfirmationId(ConfirmationIdArgs), } #[derive(Args, Clone, Debug)] @@ -115,7 +116,7 @@ fn main() -> Result<()> { args.verbose, )?; } - Commands::Confid(confirmation_id_args) => { + Commands::ConfirmationId(confirmation_id_args) => { confirmation_id(&confirmation_id_args.instid)?; } }