Skip to content
/ qrs Public

A client-side web app to generate QR codes, built with rust-wasm.

License

Notifications You must be signed in to change notification settings

de-sh/qrs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHub Workflow - rust-wasm Rust Report Card

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

  1. Setup the environment for WASM compilation
rustup target add wasm32-unknown-unknown
rustup override set nightly
cargo install wasm-pack wasm-gc
  1. Generate the WASM and bindings
wasm-pack build --target web
wasm-gc pkg/qrs_bg.wasm

View the Creation

  1. 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.
  2. Open http://localhost:8080 in a browser.