This project aims to package a Python Script into a Rust-based Command-Line Tool for calculating statistical values of sum and mean. The tool is packaged in Rust and can be built for both development and release modes. This Readme acts as a user guide to help you get started with installing and using the tool , enjoy ~
Features
- Built with Rust for performance and safety
- Command-line interface using clap
- Calculate the sum and mean of two integers
Before you can build and use the tool, make sure you have the following installed on your system:
- Rust (latest stable version recommended)
- Cargo (Rust's package manager, included with Rust)
You can follow the steps below to install and build the command-line tool:
First Clone this repository:
git clone https://github.com/nogibjj/Jennifer_Mini7_Package_Python_Script_Rust.git
Then, navigate to the Calculation Project Directory where the Cargo.toml file is located:
cd Calculation
Cargo check
is a Rust command that quickly checks your code for errors without compiling an executable, making it faster than cargo build for iterative development.
To compile the project, you can choose between development and release builds:
- If you are working on the project or want faster builds with debug symbols:
cargo build
- For optimized performance and a smaller binary:
cargo build --release
Once the tool is built, you can use it via the command line. The tool accepts two integer numbers as command-line arguments for calculating the sum and mean.
To execute the tool:
Cargo run <num1> <num2>