This project is experimental and for educational purpose to see performance of WASM and JS for decode QR Code. Using:
If you see error when using quirc scanner on safari / wasm not properly loaded. It is due to the rollup wasm loader only use WebAssembly.instantiateStreaming()
without fallback and not supported on safari. So please use Chrome or other browser instead. :v:
install dependencies and devDependencies
$ yarn install
build and start server for development in watch mode
$ yarn dev
Open http://localhost:1001 to see the website
build for production
$ yarn build
build for production and start server
$ yarn build:start
You need to install emscripten to be able to compile the C code to .wasm format. Learn HERE.
After successfully install emscipten, run this script to compile the C code to wasm.
No optimization
$ yarn build:wasm
Full optimization
$ yarn build:wasm:prod
For optimization explanation, read https://emscripten.org/docs/optimizing/Optimizing-Code.html#how-to-optimize-code