Skip to content

Commit 93a718d

Browse files
committed
Merge branch 'aclueless-spair'
2 parents 7b3035a + e299741 commit 93a718d

24 files changed

+1640
-0
lines changed

frameworks/keyed/spair-qr/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node_modules
2+
/target

frameworks/keyed/spair-qr/Cargo.toml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
[package]
2+
name = "spair_qr_benchmark"
3+
version = "0.1.0"
4+
edition = "2021"
5+
6+
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
7+
8+
[dependencies]
9+
spair = { version = "0.0.6", features = ["queue-render"] }
10+
getrandom = { version = "0.2.6", features = ["js"] }
11+
rand = { version = "0.8.5", features = ["small_rng"] }
12+
13+
[profile.release]
14+
lto = true
15+
codegen-units = 1

frameworks/keyed/spair-qr/README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
Because of the heavy amount of Rust dependencies, this example is pre-compiled, so you don't need to compile anything.
2+
3+
However, if you do want to compile it, you will need the following:
4+
5+
* [Rust](https://www.rust-lang.org/tools/install)
6+
* [Trunk](https://trunkrs.dev/)
7+
8+
After installing those, run these commands:
9+
10+
```
11+
npm install
12+
npm run build-prod-force
13+
```

frameworks/keyed/spair-qr/Trunk.toml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[build]
2+
# The index HTML file to drive the bundling process.
3+
target = "trunk_index.html"
4+
# The output dir for all final assets.
5+
dist = "bundled-dist"
6+
# The public URL from which assets are to be served.
7+
public_url = "/frameworks/keyed/spair-qr/bundled-dist/"
8+
# Whether to include hash values in the output file names.
9+
filehash = true

frameworks/keyed/spair-qr/build.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/sh
2+
3+
set -e
4+
5+
rustup target add wasm32-unknown-unknown
6+
7+
trunk build --release
8+
mv bundled-dist/index.html index.html

0 commit comments

Comments
 (0)