Crates.io | rust-cli-calculator |
lib.rs | rust-cli-calculator |
version | 0.1.1 |
source | src |
created_at | 2024-10-22 13:45:33.75677 |
updated_at | 2024-10-22 13:49:14.25817 |
description | A simple calculator written in Rust as a learning project |
homepage | |
repository | https://github.com/tudrsebastian/rust-calculator |
max_upload_size | |
id | 1418678 |
size | 19,515 |
This project is a simple yet powerful command-line calculator implemented in Rust. It provides basic arithmetic operations but will add more in the future. The calculator includes a history feature to track and review past calculations, with the ability to download this history to a file.
The easiest way to install the Rust Calculator is via crates.io:
Make sure you have Rust and Cargo installed on your system. If not, you can install them from rustup.rs.
To build and run the project from source:
cargo build
to build the projectcargo run
to start the calculatorcalc
in your terminalWhen you use the 'download history' command, a file named operations_history.txt
will be created in your current directory. This file contains a record of all calculations performed in the current session.
The project is organized into several modules:
main.rs
: The entry point of the application, handling the main loop and user interactioncalculator.rs
: Implements the core calculation logic and manages calculation historyinput.rs
: Manages user input handlingmenu.rs
: Provides a menu interface for operation selectionhistory.rs
: Defines structures and methods for managing calculation historydialoguer
: For creating an interactive command-line menuThis project is licensed under the MIT License.