blob: d2de0eee19ee86985ebd4e8fd36797b2a855d41e (
plain)
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
|
<!--
Copyright 2017 WebAssembly Community Group participants
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
<title>wasm2wat demo</title>
<link href="../third_party/codemirror/codemirror.css" rel="stylesheet">
<link href="../primer.css" rel="stylesheet">
<link href="../custom.css" rel="stylesheet">
</head>
<body>
<div class="container">
<h1>wasm2wat demo</h1>
<hr>
<p>WebAssembly has a
<a href="http://webassembly.github.io/spec/text/index.html">text format</a>
and a
<a href="http://webassembly.github.io/spec/binary/index.html">binary format</a>.
This demo converts from the binary format to the text format.
</p>
<p>
Upload a WebAssembly binary file, and the text format will be displayed.
</p>
<div>
<label>example:</label>
<select id="select" class="form-select"></select>
<button class="btn" type="button" id="upload">Upload</button>
<input type="file" id="uploadInput" class="hidden"></a>
<div>
<input type="checkbox" id="generateNames" checked>
<label for="generateNames">Generate Names</label>
</div>
<div>
<input type="checkbox" id="foldExprs" checked>
<label for="foldExprs">Fold Expressions</label>
</div>
<div>
<input type="checkbox" id="inlineExport" checked>
<label for="inlineExport">Inline Export</label>
</div>
<div>
<input type="checkbox" id="readDebugNames" checked>
<label for="readDebugNames">Read Debug Names</label>
</div>
</div>
<textarea class="editor" autofocus autocomplete="off" autocorrect="off"
autocapitalize="off" spellcheck="false" hidden></textarea>
</div>
<script src="../third_party/codemirror/codemirror.js"></script>
<script src="../third_party/codemirror/simple-mode.js"></script>
<script src="../wast-mode.js"></script>
<script src="../libwabt.js"></script>
<script src="examples.js"></script>
<script src="demo.js"></script>
</body>
</html>
|