feat: v0.1.1

This commit is contained in:
2025-05-24 10:21:51 +08:00
parent faeebca865
commit 5e97b23bdf
2 changed files with 9 additions and 14 deletions

View File

@@ -1,6 +1,6 @@
[package] [package]
name = "external-command-rs" name = "external-command-rs"
version = "0.1.0" version = "0.1.1"
edition = "2024" edition = "2024"
authors = ["Hatter Jiang"] authors = ["Hatter Jiang"]
repository = "https://git.hatter.ink/hatter/external-command-rs" repository = "https://git.hatter.ink/hatter/external-command-rs"

View File

@@ -1,43 +1,38 @@
use base64::Engine;
use base64::engine::general_purpose::STANDARD; use base64::engine::general_purpose::STANDARD;
use rust_util::{XResult, debugging, opt_result, simple_error}; use base64::Engine;
use serde::{Deserialize, de}; use rust_util::{debugging, opt_result, simple_error, XResult};
use serde::{de, Deserialize, Serialize};
use serde_json::Value; use serde_json::Value;
use std::process::{Command, Output}; use std::process::{Command, Output};
#[derive(Debug, Deserialize)] #[derive(Debug, Serialize, Deserialize)]
struct ErrorResult { struct ErrorResult {
#[allow(dead_code)]
pub success: bool, pub success: bool,
pub error: String, pub error: String,
} }
#[derive(Debug, Deserialize)] #[derive(Debug, Serialize, Deserialize)]
pub struct ExternalSpecResult { pub struct ExternalSpecResult {
#[allow(dead_code)]
pub success: bool, pub success: bool,
pub agent: String, pub agent: String,
pub specification: String, pub specification: String,
pub commands: Vec<String>, pub commands: Vec<String>,
} }
#[derive(Debug, Deserialize)] #[derive(Debug, Serialize, Deserialize)]
struct ExternalPublicKeyResult { struct ExternalPublicKeyResult {
#[allow(dead_code)]
pub success: bool, pub success: bool,
pub public_key_base64: String, pub public_key_base64: String,
} }
#[derive(Debug, Deserialize)] #[derive(Debug, Serialize, Deserialize)]
struct ExternalSignResult { struct ExternalSignResult {
#[allow(dead_code)]
pub success: bool, pub success: bool,
pub signature_base64: String, pub signature_base64: String,
} }
#[derive(Debug, Deserialize)] #[derive(Debug, Serialize, Deserialize)]
struct ExternalDhResult { struct ExternalDhResult {
#[allow(dead_code)]
pub success: bool, pub success: bool,
pub shared_secret_hex: String, pub shared_secret_hex: String,
} }