๐Ÿ“ฆ jordojordo / wasm-prime

WASM in the browser to check if a number is prime.

โ˜… 0 stars โ‘‚ 0 forks ๐Ÿ‘ 0 watching
wasmwebassembly
๐Ÿ“ฅ Clone https://github.com/jordojordo/wasm-prime.git
HTTPS git clone https://github.com/jordojordo/wasm-prime.git
SSH git clone git@github.com:jordojordo/wasm-prime.git
CLI gh repo clone jordojordo/wasm-prime
Jordon Leach Jordon Leach Update prod and dev wasm paths 66ff9f6 11 months ago ๐Ÿ“ History
๐Ÿ“‚ master View all commits โ†’
๐Ÿ“ .github
๐Ÿ“ assembly
๐Ÿ“ tests
๐Ÿ“„ .gitignore
๐Ÿ“„ asconfig.json
๐Ÿ“„ index.html
๐Ÿ“„ package.json
๐Ÿ“„ pnpm-lock.yaml
๐Ÿ“„ README.md
๐Ÿ“„ README.md

WASM Prime Checker

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

Prerequisites

Ensure you have the following installed:

Running Locally

  • Install the dependencies, compile, and serve:
pnpm install
   pnpm asbuild
   pnpm start
  • Open in browser
Navigate to http://localhost:3000

Test

Run unit tests for the WebAssembly module:
pnpm test