Skip to content

Commit 225967d

Browse files
committed
korvin framework benchmark setup
1 parent 51da158 commit 225967d

File tree

15 files changed

+8396
-3666
lines changed

15 files changed

+8396
-3666
lines changed

frameworks/non-keyed/fre/package-lock.json

Lines changed: 6912 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node_modules
2+
/target
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
[package]
2+
authors = ["Wojciech Niedźwiedź"]
3+
edition = "2021"
4+
name = "js-framework-benchmark-korvin"
5+
version = "1.0.0"
6+
7+
[dependencies]
8+
wasm-bindgen = { version = "0.2", features = ["enable-interning"] }
9+
console_error_panic_hook = "0.1"
10+
getrandom = { version = "0.2.7", features = ["js"] }
11+
rand = { version = "0.8.5", features = ["small_rng"] }
12+
korvin = { version = "0.2.1" }
13+
web-sys = "0.3"
14+
futures = "0.3.28"
15+
futures-util = "0.3.28"
16+
wasm-bindgen-futures = "0.4.37"
17+
18+
19+
[profile.release]
20+
opt-level = "z"
21+
codegen-units = 1
22+
lto = true
23+
panic = "abort"
24+
25+
[package.metadata.wasm-pack.profile.release]
26+
wasm-opt = ['-O4']

frameworks/non-keyed/korvin/README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
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+
7+
After installing that, run these commands:
8+
9+
```
10+
npm install
11+
npm run build-prod-force
12+
```

frameworks/non-keyed/korvin/build.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/usr/bin/env bash
2+
3+
set -e
4+
5+
rm ./*.js || true
6+
rm ./*.wasm || true
7+
trunk build --release --filehash false --dist ./dist ./template.html
8+
cp ./dist/*.js ./
9+
cp ./dist/*.wasm ./
10+
# cp ./dist/index.html ./index.html
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
4+
<head>
5+
<meta charset="UTF-8">
6+
<link href="/css/currentStyle.css" rel="stylesheet">
7+
<title>Korvin</title>
8+
9+
<link rel="preload" href="./js-framework-benchmark-korvin_bg.wasm" as="fetch" type="application/wasm" crossorigin="">
10+
<link rel="modulepreload" href="./js-framework-benchmark-korvin.js">
11+
</head>
12+
13+
<body><span class="preloadicon glyphicon glyphicon-remove" aria-hidden="true"></span>
14+
15+
16+
17+
<div id="main"></div>
18+
19+
20+
<script
21+
type="module">import init from './js-framework-benchmark-korvin.js'; init('./js-framework-benchmark-korvin_bg.wasm');</script>
22+
</body>
23+
24+
</html>

0 commit comments

Comments
 (0)