emscripten-tutorial

How to build an increasingly complex C/C++ codebase to WebAssembly
git clone https://git.tronto.net/emscripten-tutorial
Download | Log | Files | Refs | README

program.mjs (234B)


      1 import Primes from "./build/primes.mjs"
      2 
      3 var primes = await Primes();
      4 
      5 var low = 1;
      6 var high = 10000000;
      7 const count = primes._primes_in_range(low, high);
      8 console.log("There are " + count + " primes between " + low + " and " + high);