yushulx/zxing_barcode_reader
wasi
Public
wasmer run yushulx/zxing_barcode_reader
wasmer run yushulx/zxing_barcode_reader
ZXing Barcode Reader
The source code is ported from https://github.com/nu-book/zxing-cpp.
How to Build
Install wasi-sdk_7.0_amd64.deb .
Set environment variables in terminal:
export PATH=/opt/wasi-sdk/bin:$PATH
export CC=/opt/wasi-sdk/bin/clang
export CXX=/opt/wasi-sdk/bin/clang++
Build the project:
mkdir build
cd build
cmake ..
cmake --build .
Usage
Install wasmer, wasmtime or wapm.
Run zxing_barcode_reader.wasm
:
wasmer
wasmer run zxing_barcode_reader.wasm --dir=<image folder> <PNG file>
wasmtime
wasmtime zxing_barcode_reader.wasm --dir=<image folder> <PNG file>
wapm
wapm install yushulx/zxing_barcode_reader
wapm run zxing_barcode_reader --dir=<image folder> <PNG file>