Ledokoz Calculator is a modern, lightweight calculator application built with Rust and the Dioxus framework. This cross-platform application provides basic arithmetic operations with an elegant, responsive user interface that works across multiple platforms.
- โจ Basic Operations: Addition, subtraction, multiplication, and division
- ๐งฎ Advanced Functions: Square root calculations
- ๐งน Clear Function: Reset the calculator state with the C button
- ๐ฑ Cross-Platform: Works on Windows, macOS, Linux, and Android
- ๐ Web Support: Runs directly in browsers using WebAssembly
- ๐ Responsive Design: Adapts to various screen sizes
- ๐ง Modern Tech Stack: Built with Rust and Dioxus for safety and performance
- Frontend Framework: Dioxus (Rust-based declarative GUI)
- Build System: Cargo with Github Actions for continuous integration and deployment
- UI Rendering: WebAssembly for web deployment, native rendering for desktop/mobile
- State Management: Dioxus Signals
- Packaging: Tauri for native applications for Windows, macOS, Linux, and Android.
The calculator app is designed to work across multiple platforms:
- Web: Deployed as WebAssembly (WASM) for browser usage
- Desktop: Available for Windows (.exe), macOS (.dmg), and Linux (.deb/.AppImage)
- Mobile: Android support (.apk) with plans for iOS
Simply visit the deployed URL to use the calculator directly in your browser.
Download the appropriate installer from the Releases page:
- Windows: Download the
.exeor.msifile - macOS: Download the
.dmgfile - Linux: Choose between
.debpackage or.AppImageportable version
- Android: Download the
.apkfile from the releases page
- Rust (latest stable version recommended)
- Cargo
- Node.js (for Dioxus CLI)
-
Install Rust:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rust-lang.org/install.sh | sh
-
Install the Dioxus CLI:
cargo install dioxus-cli
-
Clone the repository:
git clone https://github.com/ledokoz-tech/calculator.git cd calculator
To run the calculator in development mode:
dioxus serveThen open your browser to http://localhost:8080
dioxus build --releaseFor your current platform:
cargo tauri buildFor specific platforms:
- Windows:
cargo tauri build --target x86_64-pc-windows-msvc - macOS:
cargo tauri build --target x86_64-apple-darwin - Linux:
cargo tauri build --target x86_64-unknown-linux-gnu
# Requires Android SDK/NDK setup
cargo tauri android buildThe calculator application follows a component-based architecture using Dioxus:
- Components: Organized using Dioxus components for UI elements like buttons and display
- State Management: Utilizes Dioxus Signals for reactive state management
- Event Handling: Handles user interactions through event callbacks
- Styling: CSS for styling with responsive design principles
App: Main application componentCalculator: Core calculator logic componentCalcButton: Reusable button componentDisplay: Shows current input and results
We welcome contributions to the Ledokoz OS Calculator project!
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes
- Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Write clean, readable Rust code following community standards
- Test changes thoroughly across different platforms when possible
- Update documentation as needed
- Follow the existing code style and patterns
calculator/
โโโ assets/ # Static assets like stylesheets
โ โโโ styles.css # Calculator-specific styles
โโโ src/ # Dioxus source files
โ โโโ app.rs # Main application logic
โ โโโ main.rs # Entry point
โโโ src-tauri/ # Tauri configuration for native apps
โ โโโ src/
โ โโโ Cargo.toml
โ โโโ tauri.conf.json # Tauri configuration
โ โโโ ...
โโโ .github/ # GitHub-specific files
โ โโโ README.md # This file
โโโ .gitignore
โโโ Cargo.toml # Rust dependencies
โโโ Dioxus.toml # Dioxus configuration
โโโ README.md # Top-level project info
โโโ ...The project includes GitHub Actions workflows for automated building and releasing:
- Continuous Integration: Automatically builds and tests changes
- Release Pipeline: Creates distributable packages for all supported platforms
- Cross-Platform Support: Builds for Windows, macOS, Linux, and Android from the same codebase
This project is licensed under the MIT License - see the LICENSE file for details.
If you encounter issues or have questions:
- Check the existing Issues
- Create a new issue if needed, providing as much detail as possible
- Include information about your platform and steps to reproduce any bugs