https://github.com/de-sh/qrs
A client-side web app to generate QR codes, built with rust-wasm.
https://github.com/de-sh/qrs
hacktoberfest rust rust-wasm wasm-pack
Last synced: 6 months ago
JSON representation
A client-side web app to generate QR codes, built with rust-wasm.
- Host: GitHub
- URL: https://github.com/de-sh/qrs
- Owner: de-sh
- License: agpl-3.0
- Created: 2020-10-21T10:12:44.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2021-09-25T16:19:55.000Z (about 4 years ago)
- Last Synced: 2025-03-19T08:39:31.631Z (7 months ago)
- Topics: hacktoberfest, rust, rust-wasm, wasm-pack
- Language: Rust
- Homepage: https://de-sh.github.io/qrs
- Size: 188 KB
- Stars: 4
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://github.com/de-sh/qrs/actions/workflows/wasm.yml)
[](https://rust-reportcard.xuri.me/report/github.com/de-sh/qrs)# QRust
Generate QR codes with rustStarted off as a server-side app and now is a client side web-app using WASM!
[inspired from this article](https://www.kiranjohns.xyz/blog/firebase-qr/) by Kiran Johns and built with [kennytm/qrcode-rs](https://github.com/kennytm/qrcode-rust).
### Compile WASM
1. Setup the environment for WASM compilation
```rust
rustup target add wasm32-unknown-unknown
rustup override set nightly
cargo install wasm-pack wasm-gc
```
2. Generate the WASM and bindings
```rust
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`](https://github.com/rustwasm/wasm-pack).
2. Open `http://localhost:8080` in a browser.