-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathc-app.html
77 lines (77 loc) · 2.09 KB
/
c-app.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>webassembly-wasi-experiments - c-app</title>
<link href="./style.css" rel="stylesheet" />
<script src="c-app.js"></script>
</head>
<body>
<header>
<h1>
<a href="./index.html" title="Back home page"
>webassembly-wasi-experiments</a
>
</h1>
<nav>
<ul class="list navigation">
<li>
<a
href="./c-app.html"
title="Test wasm version of the C program"
class="active"
>c-app</a
>
</li>
<li>
<a
href="./rust-app.html"
title="Test wasm version of the Rust program"
>rust-app</a
>
</li>
</ul>
</nav>
</header>
<main>
<p>What happens here ?</p>
<ol>
<li>
<a
href="https://github.com/topheman/webassembly-wasi-experiments/blob/master/c/c-app.c"
>c/c-app.c</a
>
was compiled to <code>.wasm</code> (you can see it in the network
inspector)
</li>
<li>
The
<a
href="https://github.com/topheman/webassembly-wasi-experiments/blob/master/browser/c-app.js"
>c-app.js</a
>
script which is running inside the browser compiles and executes that
wasm file
</li>
<li>
This runs inside the wasmer runtime which emulates file system
bindings (our original program thinks it is interacting with a real
file system)
</li>
</ol>
<p>
Bellow is the content of the <code>./tmp.txt</code> file "written" on
the emulated file system:
</p>
<pre class="output"></pre>
</main>
<footer>
<p class="copyright">
©2020-2021 -
<a href="http://labs.topheman.com/">labs.topheman.com</a> - Christophe
Rosset
</p>
</footer>
</body>
</html>