Skip to content

Commit 8b0ca46

Browse files
committed
Add yew-baseline
1 parent 1ff24ef commit 8b0ca46

File tree

12 files changed

+824
-37
lines changed

12 files changed

+824
-37
lines changed
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: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
[package]
2+
name = "js-framework-benchmark-yew"
3+
version = "1.0.0"
4+
authors = ["Isamu Mogi <isamu@leafytree.jp>"]
5+
edition = "2018"
6+
7+
[lib]
8+
crate-type = ["cdylib"]
9+
10+
[dependencies]
11+
rand = { version = "0.7.3", features = ["wasm-bindgen", "small_rng"] }
12+
wasm-bindgen = "0.2.62"
13+
yew = { git = "https://github.com/totorigolo/yew", branch = "bugfix/keyed-elements-reorder" }
14+
15+
[profile.release]
16+
lto = true
17+
codegen-units = 1
18+
panic = "abort"
19+
20+
[package.metadata.wasm-pack.profile.release]
21+
wasm-opt = ['-O4']
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+
```
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<title>Yew</title>
6+
<link href="/css/currentStyle.css" rel="stylesheet"/>
7+
<base href="bundled-dist/"></base>
8+
</head>
9+
<body>
10+
<div id='main'></div>
11+
<script type="module">
12+
import init from './js-framework-benchmark-yew.js';
13+
init('./js-framework-benchmark-yew_bg.wasm');
14+
</script>
15+
</body>
16+
</html>

0 commit comments

Comments
 (0)