WASM in the browser to check if a number is prime.
https://github.com/jordojordo/wasm-prime.git
This project demonstrates how to use AssemblyScript to compile WebAssembly (WASM) and interact with JavaScript in the browser. It includes a simple prime number checker that determines whether a given number is prime.
See it in action: https://jordojordo.github.io/wasm-prime
npm install -g pnpm)git clone https://github.com/jordojordo/wasm-prime.git
cd wasm-prime
pnpm install
http://localhost:8080
pnpm asbuild
This generates:
build/release.wasm
pnpm test