Skip to content

Latest commit

 

History

History
35 lines (27 loc) · 1.29 KB

README.md

File metadata and controls

35 lines (27 loc) · 1.29 KB

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.