The Fibonacci Calculator is a cross-platform desktop application built using Rust and Tauri. It allows users to input a number and computes its Fibonacci value,
- User friendly interface with an input field and a button to calculate fibonacci numbers.
- Error handling to ensure only valid numbers are processed.
- Built with Rust for performance and reliability.
- Utilizes Tauri for a lightweight desktop application.
-
Clone the repository:
git clone https://github.com/micheal-ndoh/Fibonacci_app.git cd fibonacci-app
-
Install Rust and Tauri: Ensure you have Rust installed. Follow the instructions on the Rust website to install Rust. Then, install Tauri by following the Tauri setup guide.
Install rust using:
curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf | sh
If it fails then try installing the dependencies manually and install rust again:
sudo apt update sudo apt install libwebkit2gtk-4.0-dev \ build-essential \ curl \ wget \ file \ libssl-dev \ libgtk-3-dev \ libayatana-appindicator3-dev \ librsvg2-dev
Install tauri using:
cargo install tauri-cli
-
Install frontend dependencies: Navigate to the
srcdirectory and run:npm install
-
Run the application: From the
src tauridirectory, run:cargo tauri dev
alternatively
npm run tauri dev
-
Build the application: From the
srcdirectory, run:cargo tauri build
alternatively
npm run tauri build
-
Run the application: Navigate to the
src-tauri/target/releasedirectory and run the generated executable../fibonacci-calculator
...
-
Package the application: Firstly list all the targets for which you want to build the application using and install the one you wish to using to build the application.
rustup target list
Install/add using
rustup target add <name of target>
Then from the
srcdirectory, run the following commands for each target:For macOS (.dmg):
cargo tauri build --target x86_64-apple-darwin
For Windows (.exe):
cargo tauri build --target x86_64-pc-windows-gnu
For Linux (.AppImage):
cargo tauri build --target x86_64-unknown-linux-gnu
-
Install the application on Linux: Ensure all required dependencies are installed:
sudo apt update sudo apt --fix-broken install sudo apt install libwebkit2gtk-4.1-0 libgtk-3-0
Then install the
.deb,rpmor appimage package use the following command:sudo dpkg -i fibonacci-calculator_0.1.0_amd64.deb
sudo rpm -i fibonacci-calculator-0.1.0.x86_64.rpm
Make the appimage executable and run;
sudo chmod +x fibonacci-calculator.AppImage ./fibonacci-calculator.AppImage
-
Install the application on Windows: Run the
.exefile. -
Install the application on macOS: Run the
.dmgfile.
- Enter a number in the input field and click the "Calculate" button to calculate the Fibonacci number.
- The result will be displayed below the input field.
- You can input multiple numbers in sequence but separate them by commas.
The application ensures that only valid numbers are processed and if an invalid number is entered, an error message is displayed but it was handle so that the user can try again by entering a valid number.
- Added multiple calculation feature to compute multiple Fibonacci numbers in sequence.
- This application can be packaged as an installable
.exe,.dmg, or.AppImage. - The application can be optimized for performance.
- The application can be distributed as a desktop application.
- Add more features to the application.
- Optimize the application for performance.
- optimize the application for size.
- Add more languages to the application.
- Add an icon for the application.
- Add more themes to the application.
If you have any feedback or suggestions, please let me know. reach me via gmail leave a Star on this repository.