From ba823ab277d8e278aa6b089b76400b3acb0babb0 Mon Sep 17 00:00:00 2001 From: chojuninengu Date: Fri, 4 Apr 2025 09:10:57 +0100 Subject: [PATCH 1/7] Add initial Cargo.toml for file encryption tool - Created a new Cargo.toml file for the file-encryption-tool project. - Defined package metadata including name, version, and edition. - Added dependencies: rust-crypto, clap, and anyhow for enhanced functionality. --- 1. Beginners/8. File-Encryption-Tool/Cargo.toml | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 1. Beginners/8. File-Encryption-Tool/Cargo.toml diff --git a/1. Beginners/8. File-Encryption-Tool/Cargo.toml b/1. Beginners/8. File-Encryption-Tool/Cargo.toml new file mode 100644 index 0000000..972ecee --- /dev/null +++ b/1. Beginners/8. File-Encryption-Tool/Cargo.toml @@ -0,0 +1,9 @@ +[package] +name = "file-encryption-tool" +version = "0.1.0" +edition = "2021" + +[dependencies] +rust-crypto = "0.2.36" +clap = { version = "4.4", features = ["derive"] } +anyhow = "1.0" \ No newline at end of file From e90b413ff54d0341e6a8f8fe8154a663433cbf46 Mon Sep 17 00:00:00 2001 From: chojuninengu Date: Fri, 4 Apr 2025 09:11:18 +0100 Subject: [PATCH 2/7] Add file encryption and decryption functionality - Implemented a command-line interface using Clap for file encryption and decryption. - Added AES-128 encryption and decryption methods with CBC mode. - Included error handling for file operations and key validation. - Users can specify input/output file paths and encryption/decryption keys via command-line arguments. --- .../8. File-Encryption-Tool/src/main.rs | 123 ++++++++++++++++++ 1 file changed, 123 insertions(+) create mode 100644 1. Beginners/8. File-Encryption-Tool/src/main.rs diff --git a/1. Beginners/8. File-Encryption-Tool/src/main.rs b/1. Beginners/8. File-Encryption-Tool/src/main.rs new file mode 100644 index 0000000..88c17a7 --- /dev/null +++ b/1. Beginners/8. File-Encryption-Tool/src/main.rs @@ -0,0 +1,123 @@ +use anyhow::{Context, Result}; +use clap::{Parser, Subcommand}; +use crypto::aes::Aes128; +use crypto::blockmodes::CbcMode; +use crypto::buffer::{ReadBuffer, RefReadBuffer, RefWriteBuffer, WriteBuffer}; +use crypto::symmetriccipher::BlockEncryptor; +use std::fs; +use std::path::PathBuf; + +#[derive(Parser)] +#[command(author, version, about, long_about = None)] +struct Cli { + #[command(subcommand)] + command: Commands, +} + +#[derive(Subcommand)] +enum Commands { + /// Encrypt a file + Encrypt { + /// Input file path + #[arg(short, long)] + input: PathBuf, + + /// Output file path + #[arg(short, long)] + output: PathBuf, + + /// Encryption key (16 bytes) + #[arg(short, long)] + key: String, + }, + + /// Decrypt a file + Decrypt { + /// Input file path + #[arg(short, long)] + input: PathBuf, + + /// Output file path + #[arg(short, long)] + output: PathBuf, + + /// Decryption key (16 bytes) + #[arg(short, long)] + key: String, + }, +} + +fn encrypt_file(input_path: &PathBuf, output_path: &PathBuf, key: &str) -> Result<()> { + let input_data = fs::read(input_path) + .with_context(|| format!("Failed to read input file: {:?}", input_path))?; + + let key_bytes = key.as_bytes(); + if key_bytes.len() != 16 { + return Err(anyhow::anyhow!("Key must be exactly 16 bytes long")); + } + + let mut key_array = [0u8; 16]; + key_array.copy_from_slice(key_bytes); + + let aes = Aes128::new(&key_array); + let mut encryptor = CbcMode::new(aes, [0u8; 16]); + + let mut output_data = Vec::new(); + let mut read_buffer = RefReadBuffer::new(&input_data); + let mut write_buffer = RefWriteBuffer::new(&mut output_data); + + encryptor + .encrypt(&mut read_buffer, &mut write_buffer, true) + .map_err(|e| anyhow::anyhow!("Encryption failed: {}", e))?; + + fs::write(output_path, output_data) + .with_context(|| format!("Failed to write output file: {:?}", output_path))?; + + println!("File encrypted successfully!"); + Ok(()) +} + +fn decrypt_file(input_path: &PathBuf, output_path: &PathBuf, key: &str) -> Result<()> { + let input_data = fs::read(input_path) + .with_context(|| format!("Failed to read input file: {:?}", input_path))?; + + let key_bytes = key.as_bytes(); + if key_bytes.len() != 16 { + return Err(anyhow::anyhow!("Key must be exactly 16 bytes long")); + } + + let mut key_array = [0u8; 16]; + key_array.copy_from_slice(key_bytes); + + let aes = Aes128::new(&key_array); + let mut decryptor = CbcMode::new(aes, [0u8; 16]); + + let mut output_data = Vec::new(); + let mut read_buffer = RefReadBuffer::new(&input_data); + let mut write_buffer = RefWriteBuffer::new(&mut output_data); + + decryptor + .decrypt(&mut read_buffer, &mut write_buffer, true) + .map_err(|e| anyhow::anyhow!("Decryption failed: {}", e))?; + + fs::write(output_path, output_data) + .with_context(|| format!("Failed to write output file: {:?}", output_path))?; + + println!("File decrypted successfully!"); + Ok(()) +} + +fn main() -> Result<()> { + let cli = Cli::parse(); + + match cli.command { + Commands::Encrypt { input, output, key } => { + encrypt_file(&input, &output, &key)?; + } + Commands::Decrypt { input, output, key } => { + decrypt_file(&input, &output, &key)?; + } + } + + Ok(()) +} From 14a8bb28f8d88302aa6a187c2116edeb5465b18e Mon Sep 17 00:00:00 2001 From: chojuninengu Date: Fri, 4 Apr 2025 09:11:31 +0100 Subject: [PATCH 3/7] Add README for File Encryption Tool - Introduced a comprehensive README file for the File Encryption Tool project. - Documented features, installation instructions, usage examples, and important notes. - Highlighted learning objectives related to file I/O, command-line parsing, and basic cryptography concepts. --- .../8. File-Encryption-Tool/README.md | 77 +++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 1. Beginners/8. File-Encryption-Tool/README.md diff --git a/1. Beginners/8. File-Encryption-Tool/README.md b/1. Beginners/8. File-Encryption-Tool/README.md new file mode 100644 index 0000000..2c75765 --- /dev/null +++ b/1. Beginners/8. File-Encryption-Tool/README.md @@ -0,0 +1,77 @@ +# File Encryption Tool + +A simple command-line tool for encrypting and decrypting files using AES-128 encryption. + +## Features + +- File encryption using AES-128 +- File decryption using AES-128 +- Simple command-line interface +- Error handling and user feedback + +## Requirements + +- Rust 2021 edition or later +- Cargo package manager + +## Installation + +1. Clone the repository +2. Navigate to the project directory: + ```bash + cd 8. File-Encryption-Tool + ``` +3. Build the project: + ```bash + cargo build --release + ``` + +## Usage + +### Encrypting a File + +```bash +cargo run -- encrypt -i input.txt -o encrypted.dat -k "your16bytekey!!" +``` + +### Decrypting a File + +```bash +cargo run -- decrypt -i encrypted.dat -o decrypted.txt -k "your16bytekey!!" +``` + +### Command Line Arguments + +- `-i, --input`: Path to the input file +- `-o, --output`: Path to the output file +- `-k, --key`: 16-byte encryption/decryption key + +## Important Notes + +- The encryption key must be exactly 16 bytes long +- Keep your encryption key secure and don't share it +- Make sure to back up your original files before encryption +- The same key must be used for both encryption and decryption + +## Learning Objectives + +This project demonstrates: +- File I/O operations in Rust +- Command-line argument parsing +- Error handling with anyhow +- Basic cryptography concepts +- Working with binary data +- Structuring a Rust CLI application + +## Example + +```bash +# Create a test file +echo "Hello, World!" > test.txt + +# Encrypt the file +cargo run -- encrypt -i test.txt -o encrypted.dat -k "supersecretkey!!" + +# Decrypt the file +cargo run -- decrypt -i encrypted.dat -o decrypted.txt -k "supersecretkey!!" +``` \ No newline at end of file From 112c9f0f816e544a0b1bd4ff6f5f1117ad2191e2 Mon Sep 17 00:00:00 2001 From: chojuninengu Date: Fri, 4 Apr 2025 09:28:07 +0100 Subject: [PATCH 4/7] Add initial Cargo.toml for calculator project - Created a new Cargo.toml file for the calculator project. - Defined package metadata including name, version, and edition. - Added dependencies: thiserror for error handling and proptest for testing purposes. --- 1. Beginners/3. Calculator/Cargo.toml | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 1. Beginners/3. Calculator/Cargo.toml diff --git a/1. Beginners/3. Calculator/Cargo.toml b/1. Beginners/3. Calculator/Cargo.toml new file mode 100644 index 0000000..2a70603 --- /dev/null +++ b/1. Beginners/3. Calculator/Cargo.toml @@ -0,0 +1,10 @@ +[package] +name = "calculator" +version = "0.1.0" +edition = "2021" + +[dependencies] +thiserror = "1.0" + +[dev-dependencies] +proptest = "1.4" \ No newline at end of file From e853f36e45a4270501e47925b58fff3a4c897af8 Mon Sep 17 00:00:00 2001 From: chojuninengu Date: Fri, 4 Apr 2025 09:28:23 +0100 Subject: [PATCH 5/7] Add calculator functionality with error handling and tests - Implemented a basic calculator with addition, subtraction, multiplication, and division operations. - Added error handling for division by zero and invalid input parsing using the `thiserror` crate. - Included unit tests for all operations and property-based tests using `proptest` to ensure correctness. --- 1. Beginners/3. Calculator/src/lib.rs | 108 ++++++++++++++++++++++++++ 1 file changed, 108 insertions(+) create mode 100644 1. Beginners/3. Calculator/src/lib.rs diff --git a/1. Beginners/3. Calculator/src/lib.rs b/1. Beginners/3. Calculator/src/lib.rs new file mode 100644 index 0000000..602f3ce --- /dev/null +++ b/1. Beginners/3. Calculator/src/lib.rs @@ -0,0 +1,108 @@ +use std::io; +use thiserror::Error; + +#[derive(Debug, Error)] +pub enum CalculatorError { + #[error("Invalid input: {0}")] + InvalidInput(String), + #[error("Division by zero")] + DivisionByZero, + #[error("IO error: {0}")] + IoError(#[from] io::Error), +} + +pub struct Calculator; + +impl Calculator { + pub fn add(a: i32, b: i32) -> i32 { + a + b + } + + pub fn subtract(a: i32, b: i32) -> i32 { + a - b + } + + pub fn multiply(a: i32, b: i32) -> i32 { + a * b + } + + pub fn divide(a: i32, b: i32) -> Result { + if b == 0 { + return Err(CalculatorError::DivisionByZero); + } + Ok(a / b) + } + + pub fn parse_input(input: &str) -> Result { + input.trim().parse().map_err(|_| { + CalculatorError::InvalidInput(format!("Could not parse '{}' as a number", input)) + }) + } +} + +#[cfg(test)] +mod tests { + use super::*; + use proptest::prelude::*; + + #[test] + fn test_add() { + assert_eq!(Calculator::add(2, 3), 5); + assert_eq!(Calculator::add(-1, 1), 0); + assert_eq!(Calculator::add(0, 0), 0); + } + + #[test] + fn test_subtract() { + assert_eq!(Calculator::subtract(5, 3), 2); + assert_eq!(Calculator::subtract(1, 1), 0); + assert_eq!(Calculator::subtract(0, 5), -5); + } + + #[test] + fn test_multiply() { + assert_eq!(Calculator::multiply(2, 3), 6); + assert_eq!(Calculator::multiply(-2, 3), -6); + assert_eq!(Calculator::multiply(0, 5), 0); + } + + #[test] + fn test_divide() { + assert_eq!(Calculator::divide(6, 2).unwrap(), 3); + assert_eq!(Calculator::divide(-6, 2).unwrap(), -3); + assert!(Calculator::divide(5, 0).is_err()); + } + + #[test] + fn test_parse_input() { + assert_eq!(Calculator::parse_input("42").unwrap(), 42); + assert_eq!(Calculator::parse_input("-42").unwrap(), -42); + assert!(Calculator::parse_input("not a number").is_err()); + } + + proptest! { + #[test] + fn test_add_property(a: i32, b: i32) { + let result = Calculator::add(a, b); + assert_eq!(result, a + b); + } + + #[test] + fn test_subtract_property(a: i32, b: i32) { + let result = Calculator::subtract(a, b); + assert_eq!(result, a - b); + } + + #[test] + fn test_multiply_property(a: i32, b: i32) { + let result = Calculator::multiply(a, b); + assert_eq!(result, a * b); + } + + #[test] + fn test_divide_property(a: i32, b in 1..=i32::MAX) { + let result = Calculator::divide(a, b).unwrap(); + assert_eq!(result, a / b); + } + } +} From 73d827aaf34b982b1c9c9e0750d1ee1fc946bfe0 Mon Sep 17 00:00:00 2001 From: chojuninengu Date: Fri, 4 Apr 2025 09:28:38 +0100 Subject: [PATCH 6/7] Add main functionality for interactive calculator - Implemented the main function for a command-line calculator that supports addition, subtraction, multiplication, and division. - Included user input handling and error messages for invalid operations. - Utilized the Calculator struct for performing calculations and parsing input. --- 1. Beginners/3. Calculator/src/main.rs | 39 ++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 1. Beginners/3. Calculator/src/main.rs diff --git a/1. Beginners/3. Calculator/src/main.rs b/1. Beginners/3. Calculator/src/main.rs new file mode 100644 index 0000000..c45254f --- /dev/null +++ b/1. Beginners/3. Calculator/src/main.rs @@ -0,0 +1,39 @@ +use calculator::{Calculator, CalculatorError}; +use std::io::{self, Write}; + +fn main() -> Result<(), CalculatorError> { + println!("\t\tCALCULATOR\n\n\tAVAILABLE ACTIONS\n1.Addition\n2.Subtraction\n3.Multiplication\n4.Division"); + + print!("\n\t:: "); + io::stdout().flush()?; + + let mut input = String::new(); + io::stdin().read_line(&mut input)?; + let operation = input.trim(); + + print!("Number 1: "); + io::stdout().flush()?; + let mut first = String::new(); + io::stdin().read_line(&mut first)?; + let first_num = Calculator::parse_input(&first)?; + + print!("Number 2: "); + io::stdout().flush()?; + let mut second = String::new(); + io::stdin().read_line(&mut second)?; + let second_num = Calculator::parse_input(&second)?; + + let result = match operation { + "1" | "Addition" | "+" => Calculator::add(first_num, second_num), + "2" | "Subtraction" | "-" => Calculator::subtract(first_num, second_num), + "3" | "Multiplication" | "*" => Calculator::multiply(first_num, second_num), + "4" | "Division" | "/" => Calculator::divide(first_num, second_num)?, + _ => { + println!("Invalid operation selected!"); + return Ok(()); + } + }; + + println!("\n\n\tResult: {}", result); + Ok(()) +} From 9e0ee1a9b0eb1969f049c0b0b9271f58cfc97b26 Mon Sep 17 00:00:00 2001 From: chojuninengu Date: Fri, 4 Apr 2025 09:29:04 +0100 Subject: [PATCH 7/7] Add Cargo.lock for calculator project - Generated Cargo.lock file to lock dependencies for the calculator project. - Includes all necessary packages and their versions to ensure consistent builds. - Facilitates dependency management and version control for the project. --- 1. Beginners/3. Calculator/Cargo.lock | 433 ++++++++++++++++++++++++++ 1 file changed, 433 insertions(+) create mode 100644 1. Beginners/3. Calculator/Cargo.lock diff --git a/1. Beginners/3. Calculator/Cargo.lock b/1. Beginners/3. Calculator/Cargo.lock new file mode 100644 index 0000000..3408b45 --- /dev/null +++ b/1. Beginners/3. Calculator/Cargo.lock @@ -0,0 +1,433 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "autocfg" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" + +[[package]] +name = "bit-set" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08807e080ed7f9d5433fa9b275196cfc35414f66a0c79d864dc51a0d825231a3" +dependencies = [ + "bit-vec", +] + +[[package]] +name = "bit-vec" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e764a1d40d510daf35e07be9eb06e75770908c27d411ee6c92109c9840eaaf7" + +[[package]] +name = "bitflags" +version = "2.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c8214115b7bf84099f1309324e63141d4c5d7cc26862f97a0a857dbefe165bd" + +[[package]] +name = "calculator" +version = "0.1.0" +dependencies = [ + "proptest", + "thiserror", +] + +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "errno" +version = "0.3.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33d852cb9b869c2a9b3df2f71a3074817f01e1844f839a144f5fcef059a4eb5d" +dependencies = [ + "libc", + "windows-sys", +] + +[[package]] +name = "fastrand" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" + +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "getrandom" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" +dependencies = [ + "cfg-if", + "libc", + "wasi 0.11.0+wasi-snapshot-preview1", +] + +[[package]] +name = "getrandom" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73fea8450eea4bac3940448fb7ae50d91f034f941199fcd9d909a5a07aa455f0" +dependencies = [ + "cfg-if", + "libc", + "r-efi", + "wasi 0.14.2+wasi-0.2.4", +] + +[[package]] +name = "lazy_static" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" + +[[package]] +name = "libc" +version = "0.2.171" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c19937216e9d3aa9956d9bb8dfc0b0c8beb6058fc4f7a4dc4d850edf86a237d6" + +[[package]] +name = "linux-raw-sys" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe7db12097d22ec582439daf8618b8fdd1a7bef6270e9af3b1ebcd30893cf413" + +[[package]] +name = "num-traits" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" +dependencies = [ + "autocfg", +] + +[[package]] +name = "once_cell" +version = "1.21.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" + +[[package]] +name = "ppv-lite86" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" +dependencies = [ + "zerocopy", +] + +[[package]] +name = "proc-macro2" +version = "1.0.94" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a31971752e70b8b2686d7e46ec17fb38dad4051d94024c88df49b667caea9c84" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "proptest" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14cae93065090804185d3b75f0bf93b8eeda30c7a9b4a33d3bdb3988d6229e50" +dependencies = [ + "bit-set", + "bit-vec", + "bitflags", + "lazy_static", + "num-traits", + "rand", + "rand_chacha", + "rand_xorshift", + "regex-syntax", + "rusty-fork", + "tempfile", + "unarray", +] + +[[package]] +name = "quick-error" +version = "1.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" + +[[package]] +name = "quote" +version = "1.0.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "r-efi" +version = "5.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74765f6d916ee2faa39bc8e68e4f3ed8949b48cccdac59983d287a7cb71ce9c5" + +[[package]] +name = "rand" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +dependencies = [ + "libc", + "rand_chacha", + "rand_core", +] + +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom 0.2.15", +] + +[[package]] +name = "rand_xorshift" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d25bf25ec5ae4a3f1b92f929810509a2f53d7dca2f50b794ff57e3face536c8f" +dependencies = [ + "rand_core", +] + +[[package]] +name = "regex-syntax" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" + +[[package]] +name = "rustix" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d97817398dd4bb2e6da002002db259209759911da105da92bec29ccb12cf58bf" +dependencies = [ + "bitflags", + "errno", + "libc", + "linux-raw-sys", + "windows-sys", +] + +[[package]] +name = "rusty-fork" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb3dcc6e454c328bb824492db107ab7c0ae8fcffe4ad210136ef014458c1bc4f" +dependencies = [ + "fnv", + "quick-error", + "tempfile", + "wait-timeout", +] + +[[package]] +name = "syn" +version = "2.0.100" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b09a44accad81e1ba1cd74a32461ba89dee89095ba17b32f5d03683b1b1fc2a0" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "tempfile" +version = "3.19.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7437ac7763b9b123ccf33c338a5cc1bac6f69b45a136c19bdd8a65e3916435bf" +dependencies = [ + "fastrand", + "getrandom 0.3.2", + "once_cell", + "rustix", + "windows-sys", +] + +[[package]] +name = "thiserror" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "unarray" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eaea85b334db583fe3274d12b4cd1880032beab409c0d774be044d4480ab9a94" + +[[package]] +name = "unicode-ident" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512" + +[[package]] +name = "wait-timeout" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ac3b126d3914f9849036f826e054cbabdc8519970b8998ddaf3b5bd3c65f11" +dependencies = [ + "libc", +] + +[[package]] +name = "wasi" +version = "0.11.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" + +[[package]] +name = "wasi" +version = "0.14.2+wasi-0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9683f9a5a998d873c0d21fcbe3c083009670149a8fab228644b8bd36b2c48cb3" +dependencies = [ + "wit-bindgen-rt", +] + +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-targets" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +dependencies = [ + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_gnullvm", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" + +[[package]] +name = "wit-bindgen-rt" +version = "0.39.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f42320e61fe2cfd34354ecb597f86f413484a798ba44a8ca1165c58d42da6c1" +dependencies = [ + "bitflags", +] + +[[package]] +name = "zerocopy" +version = "0.8.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2586fea28e186957ef732a5f8b3be2da217d65c5969d4b1e17f973ebbe876879" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.8.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a996a8f63c5c4448cd959ac1bab0aaa3306ccfd060472f85943ee0750f0169be" +dependencies = [ + "proc-macro2", + "quote", + "syn", +]