Skip to content

Commit b879105

Browse files
committed
update diagram
1 parent 86ce78c commit b879105

4 files changed

+3
-25
lines changed

README.md

Lines changed: 3 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,7 @@
1818

1919
### 1. project setup
2020

21-
22-
```mermaid
23-
graph BT
24-
B[frontend] -->|parcel| A[bundled webapp]
25-
C[wasm file] --> B
26-
D[rust code] --> C
27-
E["yew"] -->|elm style frontend| D
28-
F["futures 0.3"] -->|async/await| D
29-
G["web-sys"] -->|fetch api| D
30-
I["wasm-bindgen-futures"] -->|promise <-> future| D
31-
H[bulma] -->|pure css styling framework| B
32-
```
21+
![Screenshot_20190809_144943](/assets/Screenshot_20190809_144943.png)
3322

3423

3524
**components diagram**
@@ -394,10 +383,7 @@ This is rather simple thanks to wasm-bindgen and the rustwasm team for providing
394383

395384
For rustaceans that are not familiar with webdev and frontend bundlers, the minimal process to build rust to wasm is like this:
396385

397-
```mermaid
398-
graph LR
399-
rust -->|cargo build --target wasm32-unknown-unknown| wasm
400-
```
386+
![Screenshot_20190809_144959](/assets/Screenshot_20190809_144959.png)
401387

402388
This will make your rust program a wasm binary. However, for calling rust functions in js more friendly, wasm-bindgen will help us tag our rust functions in the wasm module along with stuffs like type conversion in the generated wasm between rust/wasm.
403389

@@ -420,13 +406,7 @@ While we're talking about fronend development, prototyping quickly is rather imp
420406

421407
So the build process now looks like this:
422408

423-
```mermaid
424-
graph LR
425-
D[rust] -->|managed by bundler| C
426-
C[wasm] -->|managed by bundler| A[js_script]
427-
F[additional js/css/html] -->|still the bundler| E[output bundle]
428-
A --> E
429-
```
409+
![Screenshot_20190809_145011](/assets/Screenshot_20190809_145011.png)
430410

431411
Eventually, rust code is still governed by Cargo.toml, and will build with the right rlease falg when your bundler says so, but not in dev-mode (often enable hot-reload).
432412

@@ -551,5 +531,3 @@ Therefore, I've tried to build the dist bundle first, move it to another folder,
551531
# Demo
552532

553533
![Peek 2019-08-06 04-14](/assets/Peek%202019-08-06%2004-14.gif)
554-
555-
[Imgur link](https://imgur.com/Dfzmg0Q)

assets/Screenshot_20190809_144943.png

30.4 KB
Loading

assets/Screenshot_20190809_144959.png

7.39 KB
Loading

assets/Screenshot_20190809_145011.png

10.8 KB
Loading

0 commit comments

Comments
 (0)