feat: 1.7.11, update dependencies, change default features

This commit is contained in:
2024-03-17 12:46:34 +08:00
parent de675d215a
commit 2067faec8e
4 changed files with 9 additions and 8 deletions

2
Cargo.lock generated
View File

@@ -1843,7 +1843,7 @@ dependencies = [
[[package]] [[package]]
name = "tiny-encrypt" name = "tiny-encrypt"
version = "1.7.10" version = "1.7.11"
dependencies = [ dependencies = [
"aes-gcm-stream", "aes-gcm-stream",
"base64", "base64",

View File

@@ -1,6 +1,6 @@
[package] [package]
name = "tiny-encrypt" name = "tiny-encrypt"
version = "1.7.10" version = "1.7.11"
edition = "2021" edition = "2021"
license = "MIT" license = "MIT"
description = "A simple and tiny file encrypt tool" description = "A simple and tiny file encrypt tool"
@@ -9,7 +9,8 @@ repository = "https://git.hatter.ink/hatter/tiny-encrypt-rs"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[features] [features]
default = ["decrypt", "macos", "smartcard", "secure-enclave"] default = ["decrypt", "macos", "smartcard"]
full = ["decrypt", "macos", "smartcard", "secure-enclave"]
decrypt = ["smartcard"] decrypt = ["smartcard"]
smartcard = ["openpgp-card", "openpgp-card-pcsc", "yubikey"] smartcard = ["openpgp-card", "openpgp-card-pcsc", "yubikey"]
macos = ["security-framework"] macos = ["security-framework"]

View File

@@ -3,11 +3,11 @@ _:
# Install local # Install local
install: install:
cargo install --path . cargo install --no-default-features --features full --path .
# Default build release # Default build release
build: build:
cargo build --release cargo build --no-default-features --features full --release
# Build release without features # Build release without features
build-no-features: build-no-features:
@@ -20,4 +20,4 @@ try-build-all:
cargo build --no-default-features --features decrypt cargo build --no-default-features --features decrypt
cargo build --no-default-features --features macos cargo build --no-default-features --features macos
cargo build --no-default-features --features secure-enclave cargo build --no-default-features --features secure-enclave
cargo build cargo build --no-default-features --features full

View File

@@ -1,5 +1,5 @@
use clap::Args; use clap::Args;
use rust_util::{iff, XResult}; use rust_util::XResult;
use crate::util; use crate::util;
#[cfg(feature = "secure-enclave")] #[cfg(feature = "secure-enclave")]
@@ -17,7 +17,7 @@ pub fn version(_cmd_version: CmdVersion) -> XResult<()> {
#[cfg(feature = "smartcard")] #[cfg(feature = "smartcard")]
features.push("smartcard".to_string()); features.push("smartcard".to_string());
#[cfg(feature = "secure-enclave")] #[cfg(feature = "secure-enclave")]
features.push(format!("secure-enclave{}", iff!(util_keychainkey::is_support_se(), "*", ""))); features.push(format!("secure-enclave{}", rust_util::iff!(util_keychainkey::is_support_se(), "*", "")));
if features.is_empty() { features.push("-".to_string()); } if features.is_empty() { features.push("-".to_string()); }
println!( println!(
"User-Agent: {} [with features: {}]\n{}", "User-Agent: {} [with features: {}]\n{}",