60 lines
1.4 KiB
Markdown
60 lines
1.4 KiB
Markdown
# mcalc - Simple Dioxus Calculator
|
|
|
|
A simple, modern, and beautiful calculator application built with Rust and Dioxus.
|
|
|
|
## Description
|
|
|
|
**mcalc** is a lightweight desktop calculator that demonstrates how to build a clean UI with state management in Dioxus. It features a modern dark mode design with glassmorphism effects and responsiveness.
|
|
|
|
## Features
|
|
|
|
- **Basic Arithmetic**: Addition, Subtraction, Multiplication, Division.
|
|
- **Modern UI**: Clean typography, glassmorphism card, and neon accents.
|
|
- **Interactive**: Hover effects and smooth animations.
|
|
- **Responsive**: Adapts to window resizing.
|
|
|
|
## Tech Stack
|
|
|
|
- **Rust**: Core logic and safety.
|
|
- **Dioxus**: UI framework (React-like for Rust).
|
|
- **CSS3**: Custom styling with variables and flexbox/grid.
|
|
|
|
## Getting Started
|
|
|
|
### Prerequisites
|
|
|
|
- [Rust](https://www.rust-lang.org/tools/install) installed.
|
|
- [Dioxus CLI](https://dioxuslabs.com/learn/0.6/getting_started) (optional but recommended for development).
|
|
|
|
```bash
|
|
cargo install dioxus-cli
|
|
```
|
|
|
|
### Running the App
|
|
|
|
1. **Clone the repository**:
|
|
```bash
|
|
git clone <repository_url>
|
|
cd mcalc
|
|
```
|
|
|
|
2. **Run with Cargo**:
|
|
```bash
|
|
cargo run
|
|
```
|
|
|
|
**Or with Dioxus CLI (for hot reloading):**
|
|
```bash
|
|
dx serve
|
|
```
|
|
|
|
## Project Structure
|
|
|
|
- `src/main.rs`: Entry point.
|
|
- `src/ui.rs`: Main calculator UI and logic calls.
|
|
- `assets/main.css`: Styling and themes.
|
|
- `src/logic.rs`: Calculator logic.
|
|
|
|
## License
|
|
|
|
GPL-3 License |