Skip to content

Commit 0ec3413

Browse files
committed
Merge branch 'voidpumpkin-yew-trunk'
2 parents ee0fb1a + 5751b34 commit 0ec3413

File tree

10 files changed

+1096
-0
lines changed

10 files changed

+1096
-0
lines changed

frameworks/keyed/yew-hooks/.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/yew-hooks/Cargo.toml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
[package]
2+
name = "js-framework-benchmark-yew-hooks"
3+
version = "1.0.0"
4+
authors = ["Julius Lungys <[email protected]>"]
5+
edition = "2021"
6+
7+
[lib]
8+
crate-type = ["cdylib"]
9+
10+
[dependencies]
11+
rand = { version = "0.8.4", features = ["small_rng"] }
12+
getrandom = { version = "0.2.1", features = ["js"] }
13+
wasm-bindgen = "0.2.78"
14+
web-sys = { version = "0.3.55", features = ["Window"]}
15+
yew = "0.19.3"
16+
17+
[profile.release]
18+
lto = true
19+
codegen-units = 1
20+
panic = "abort"
21+
22+
[package.metadata.wasm-pack.profile.release]
23+
wasm-opt = ['-O4']

frameworks/keyed/yew-hooks/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+
```
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-Hooks</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-hooks.js';
13+
init('./js-framework-benchmark-yew-hooks_bg.wasm');
14+
</script>
15+
</body>
16+
</html>

0 commit comments

Comments
 (0)