web-calc is a simple web-based calculator that supports both integer and floating-point numbers. It allows users to perform basic arithmetic operations such as addition, subtraction, multiplication, division, modulus, logical AND, logical OR, and parenthesis operations.
- WebAssembly: Leveraging the power of WebAssembly for efficient computation in the browser.
- Rust: Calculation logic is written in Rust, ensuring reliability and performance.
- NPM: The web interface is developed using NPM, providing a seamless user experience.
- lalrpop: Utilizing 'lalrpop' for lexer and parser, simplifying expression handling and improving efficiency.
Before building it, make sure you hava setup the environment properly.
For detailed instructions, refer to the official documentation on: Compiling from Rust to WebAssembly
Follow these steps to build and deploy the web-calc project:
- Clone the repository:
git clone https://github.com/wlonestar/web-calc.git
- Build the project using the provided Makefile:
make
- Deploy the project using npm
make deploy
Now we can use it: