Skip to content

wlonestar/web-calc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

web-calc

License

Overview

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.

Technology Stack

  • 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.

Usage

Prerequisites

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

Build and Deployment

Follow these steps to build and deploy the web-calc project:

  1. Clone the repository:
git clone https://github.com/wlonestar/web-calc.git
  1. Build the project using the provided Makefile:
make
  1. Deploy the project using npm
make deploy

Now we can use it: