Prerequisites
Before building from source, ensure you have the following installed:- Rust toolchain (rustc and cargo)
- Git
Building with Cargo
Build and install
Use the provided installation script to build and install cloneit:The script runs the following command:This compiles the project in release mode and installs the binary to your Cargo bin directory (typically
~/.cargo/bin/).Manual Build
If you prefer to build without installing, you can use:target/release/cloneit.
Release Profile Configuration
The project uses optimized release profile settings inCargo.toml for better performance and smaller binary size:
What these settings do:
strip = true: Removes debugging symbols from the binary, significantly reducing its sizelto = true: Enables Link Time Optimization, which performs whole-program optimization for better runtime performance
Dependencies
The project relies on the following key dependencies:- clap (4.0.10): Command-line argument parsing
- reqwest (0.11): HTTP client for GitHub API requests
- tokio (1.x): Async runtime
- serde_json (1.x): JSON serialization/deserialization
- zip (0.6): File archiving functionality
- yansi (1.0.1): Terminal color support
- async-recursion (1.0.0): Recursive async functions
- walkdir (2.x): Directory traversal