This project implements a simple calculator using WebAssembly (WASM) with Rust, made with Leptos and Trunk. The calculator evaluates basic arithmetic expressions entered by the user.
To use the calculator, simply input an arithmetic expression into the text field provided. The expression should be in the format operand1 operator operand2
, for example, 2 + 2
or 10 * 5
. Supported operators are addition (+
), subtraction (-
), multiplication (*
), and division (/
). Press Enter after entering the expression to see the result displayed below.
To run this project locally, ensure you have Rust and Cargo installed. Then, follow these steps:
- Clone this repository to your local machine.
- Navigate to the project directory in your terminal.
- Run
trunk serve --open
to serve the project using a builtin HTTP server. - Access the project in your web browser by navigating to
http://localhost:<port>
.
Contributions to this project are welcome. If you find any bugs or have suggestions for improvements, feel free to open an issue or submit a pull request.
This project is licensed under the MIT License. See the LICENSE
file for more information.