Skip to content
Submitted over 1 year ago

Calculator PWA built w/ HTML, CSS, Typescript, Rust and Web Assembly

accessibility, pwa, tailwind-css, vite, typescript
@princemuel
A solution to the Calculator app challenge

Solution retrospective


What are you most proud of, and what would you do differently next time?
  • I built a lexer, token parser and evaluator for the calculator to evaluate expressions. It was an enlightening process. I got to understand a bit of how programming languages are created.
  • I made the app into a progressive web app, able to work offline with cached assets. It is also installable on chromium based browsers and once installed, works as a native mobile/desktop app. It is also very lightweight ~200kb.
What challenges did you encounter, and how did you overcome them?

Some of the challenges I encountered were:

  • Ensuring the input expressions were valid. I fixed that in the Rust backend by creating a lexer, token parser and evaluator. The current issue is integrating that in the frontend.
What specific areas of your project would you like help with?

Handling Input/Output in JavaScript

Currently, the calculator's Rust/Wasm backend is parsing the input properly. The issue is setting up the JavaScript frontend to properly validate the user's input and make sure the correct values are sent to the backend

Code
Loading...

Please log in to post a comment

Log in

Community feedback

No feedback yet. Be the first to give feedback on princemuel’s solution.

Join our Discord community

Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!

Join our Discord