Skip to content

Commit d07a65c

Browse files
committed
Merge branch 'master' of https://github.com/gbj/js-framework-benchmark into gbj-master
2 parents fcfeca3 + 165b8ac commit d07a65c

File tree

14 files changed

+1262
-3584
lines changed

14 files changed

+1262
-3584
lines changed

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

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
[package]
2+
authors = ["Greg Johnston"]
3+
edition = "2021"
4+
name = "js-framework-benchmark-leptos"
5+
version = "1.0.0"
6+
7+
[lib]
8+
crate-type = ["cdylib"]
9+
10+
[dependencies]
11+
getrandom = { version = "0.2.7", features = ["js"] }
12+
rand = { version = "0.8.5", features = ["small_rng"] }
13+
leptos = { version = "0.0.3", features = ["csr"]}
14+
wasm-bindgen = "0.2.82"
15+
web-sys = { version = "0.3.59", features = ["Window", "Document"] }
16+
17+
[profile.release]
18+
codegen-units = 1
19+
lto = true
20+
panic = "abort"
21+
22+
[package.metadata.wasm-pack.profile.release]
23+
wasm-opt = ['-O4']

frameworks/keyed/leptos/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: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<title>Leptos</title>
6+
<base href="bundled-dist/"></base>
7+
<link href="/css/currentStyle.css" rel="stylesheet"/>
8+
<link rel="modulepreload" href="./js-framework-benchmark-sycamore.js" />
9+
<link rel="preload" href="./js-framework-benchmark-sycamore_bg.wasm" as="fetch" type="application/wasm" crossorigin />
10+
</head>
11+
<body>
12+
<span class="preloadicon glyphicon glyphicon-remove" aria-hidden="true"></span>
13+
<div id='main'></div>
14+
<script type="module">
15+
import init from './js-framework-benchmark-leptos.js';
16+
init('./js-framework-benchmark-leptos_bg.wasm');
17+
</script>
18+
</body>
19+
</html>

0 commit comments

Comments
 (0)