Something went wrong. Try again.
A client-side web app to generate QR codes, built with rust-wasm.
Something went wrong. Try again.
Files
- Rust 60%
- JavaScript 30%
- HTML 10%
README.md
QRust #
Generate QR codes with rust
Started off as a server-side app and now is a client side web-app using WASM!
inspired from this article by Kiran Johns and built with kennytm/qrcode-rs.
Compile WASM #
- Setup the environment for WASM compilation
rustup target add wasm32-unknown-unknown
rustup override set nightly
cargo install wasm-pack wasm-gc
- Generate the WASM and bindings
wasm-pack build --target web
wasm-gc pkg/qrs_bg.wasm
View the Creation #
- Setup a web-server to host the following files & folders in particular:
- index.html - The html that loads the app.
- index.js - The JS that starts the show.
- pkg/ - The package folder that houses our wasm and bindings generated with
wasm-pack.
- Open
http://localhost:8080in a browser.