- Install Emscripten if not done already.
- In an empty build folder, invoke
emcmake cmake <path to zxing-cpp.git/wrappers/wasm>
. - Invoke
cmake --build .
to createzxing.js
andzxing.wasm
(and_reader
/_writer
versions). - To see how to include these into a working HTML page, have a look at the reader and writer demos.
- To quickly test your build, copy those demo files into your build directory and run e.g.
emrun --serve_after_close demo_reader.html
.
You can also download the latest build output from the continuous integration system from the Actions tab. Look for 'wasm-artifacts'. Also check out the live demos.