{"id":27072722,"url":"https://github.com/ilukemagic/rust-calculator-cli","last_synced_at":"2025-10-16T09:34:56.826Z","repository":{"id":282358397,"uuid":"947954131","full_name":"ilukemagic/rust-calculator-cli","owner":"ilukemagic","description":"A simple command-line calculator application written in Rust that supports basic arithmetic operations.","archived":false,"fork":false,"pushed_at":"2025-03-14T10:18:45.000Z","size":3,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-01T05:04:51.109Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ilukemagic.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-03-13T14:09:31.000Z","updated_at":"2025-03-27T13:54:04.000Z","dependencies_parsed_at":"2025-03-14T07:21:59.472Z","dependency_job_id":"96c9bf6e-e722-4a52-ba71-0cf50449de6f","html_url":"https://github.com/ilukemagic/rust-calculator-cli","commit_stats":null,"previous_names":["ilukemagic/rust-calculator-cli"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ilukemagic/rust-calculator-cli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ilukemagic%2Frust-calculator-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ilukemagic%2Frust-calculator-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ilukemagic%2Frust-calculator-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ilukemagic%2Frust-calculator-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ilukemagic","download_url":"https://codeload.github.com/ilukemagic/rust-calculator-cli/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ilukemagic%2Frust-calculator-cli/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279173488,"owners_count":26119078,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-16T02:00:06.019Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-04-05T23:19:49.276Z","updated_at":"2025-10-16T09:34:56.821Z","avatar_url":"https://github.com/ilukemagic.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Rust Calculator CLI\n\nA simple command-line calculator application written in Rust that supports basic arithmetic operations.\n\n## Features\n\n- Interactive command-line interface\n- Supports basic arithmetic operations:\n  - Addition (+)\n  - Subtraction (-)\n  - Multiplication (\\*)\n  - Division (/)\n- Error handling for invalid inputs\n- Follows order of operations (multiplication and division before addition and subtraction)\n\n## Installation\n\n### Prerequisites\n\n- Rust and Cargo (install from [https://www.rust-lang.org/tools/install](https://www.rust-lang.org/tools/install))\n\n### Building from Source\n\n1. Clone the repository:\n\n   ```\n   git clone https://github.com/yourusername/rust-calculator-cli.git\n   cd rust-calculator-cli\n   ```\n\n2. Build the project:\n\n   ```\n   cargo build --release\n   ```\n\n3. Run the calculator:\n\n   ```\n   cargo run --release\n   ```\n\n## Usage\n\nAfter starting the application, you'll see a prompt where you can enter mathematical expressions:\n\n```\nWelcome to the Rust Calculator!\nEnter 'quit' to exit.\n\u003e 2 + 3\nTokens: [Number(2.0), Plus, Number(3.0)]\nResult: 5\n\u003e 10 * 5 - 8\nTokens: [Number(10.0), Multiply, Number(5.0), Minus, Number(8.0)]\nResult: 42\n\u003e quit\n```\n\n### Supported Operations\n\n- Addition: `a + b`\n- Subtraction: `a - b`\n- Multiplication: `a * b`\n- Division: `a / b`\n\nThe calculator follows the standard order of operations (multiplication and division before addition and subtraction).\n\n## Project Structure\n\n- `src/main.rs`: Contains all the calculator logic including tokenization, parsing, and evaluation\n\n## Development\n\n### Building and Testing\n\n```\n# Build the project\ncargo build\n\n# Run the tests\ncargo test\n\n# Run the application\ncargo run\n```\n\n## License\n\nThis project is open source and available under the [MIT License](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Filukemagic%2Frust-calculator-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Filukemagic%2Frust-calculator-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Filukemagic%2Frust-calculator-cli/lists"}