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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
|
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<style>
table.head, table.foot { width: 100%; }
td.head-rtitle, td.foot-os { text-align: right; }
td.head-vol { text-align: center; }
div.Pp { margin: 1ex 0ex; }
</style>
<title>WABT(1)</title>
</head>
<body>
<table class="head">
<tr>
<td class="head-ltitle">WABT(1)</td>
<td class="head-vol">General Commands Manual</td>
<td class="head-rtitle">WABT(1)</td>
</tr>
</table>
<div class="manual-text">
<h1 class="Sh" title="Sh" id="NAME"><a class="selflink" href="#NAME">NAME</a></h1>
<b class="Nm" title="Nm">wast2json</b> —
<span class="Nd" title="Nd">convert a file in the wasm spec test format to a
JSON file and associated wasm binary files</span>
<h1 class="Sh" title="Sh" id="SYNOPSIS"><a class="selflink" href="#SYNOPSIS">SYNOPSIS</a></h1>
<table class="Nm">
<tr>
<td><b class="Nm" title="Nm">wast2json</b></td>
<td>[<span class="Op">options</span>]
<var class="Ar" title="Ar">file</var></td>
</tr>
</table>
<h1 class="Sh" title="Sh" id="DESCRIPTION"><a class="selflink" href="#DESCRIPTION">DESCRIPTION</a></h1>
<b class="Nm" title="Nm">wast2json</b> reads a file in the wasm spec test
format, checks it for errors, and converts it to a JSON file and associated
wasm binary files.
<div class="Pp"></div>
The options are as follows:
<dl class="Bl-tag">
<dt class="It-tag"><a class="selflink" href="#v"><b class="Fl" title="Fl" id="v">-v</b></a>,
<b class="Fl" title="Fl">-</b><b class="Fl" title="Fl">-verbose</b></dt>
<dd class="It-tag">Use multiple times for more info</dd>
<dt class="It-tag"><b class="Fl" title="Fl">-</b><b class="Fl" title="Fl">-help</b></dt>
<dd class="It-tag">Print this help message</dd>
<dt class="It-tag"><b class="Fl" title="Fl">-</b><b class="Fl" title="Fl">-debug-parser</b></dt>
<dd class="It-tag">Turn on debugging the parser of wast files</dd>
<dt class="It-tag"><b class="Fl" title="Fl">-</b><b class="Fl" title="Fl">-enable-exceptions</b></dt>
<dd class="It-tag">Enable Experimental exception handling</dd>
<dt class="It-tag"><b class="Fl" title="Fl">-</b><b class="Fl" title="Fl">-disable-mutable-globals</b></dt>
<dd class="It-tag">Disable Import/export mutable globals</dd>
<dt class="It-tag"><b class="Fl" title="Fl">-</b><b class="Fl" title="Fl">-enable-saturating-float-to-int</b></dt>
<dd class="It-tag">Enable Saturating float-to-int operators</dd>
<dt class="It-tag"><b class="Fl" title="Fl">-</b><b class="Fl" title="Fl">-enable-sign-extension</b></dt>
<dd class="It-tag">Enable Sign-extension operators</dd>
<dt class="It-tag"><b class="Fl" title="Fl">-</b><b class="Fl" title="Fl">-enable-simd</b></dt>
<dd class="It-tag">Enable SIMD support</dd>
<dt class="It-tag"><b class="Fl" title="Fl">-</b><b class="Fl" title="Fl">-enable-threads</b></dt>
<dd class="It-tag">Enable Threading support</dd>
<dt class="It-tag"><b class="Fl" title="Fl">-</b><b class="Fl" title="Fl">-enable-multi-value</b></dt>
<dd class="It-tag">Enable Multi-value</dd>
<dt class="It-tag"><b class="Fl" title="Fl">-</b><b class="Fl" title="Fl">-enable-tail-call</b></dt>
<dd class="It-tag">Enable Tail-call support</dd>
<dt class="It-tag"><a class="selflink" href="#o"><b class="Fl" title="Fl" id="o">-o</b></a>,
<b class="Fl" title="Fl">-</b><b class="Fl" title="Fl">-output=FILE</b></dt>
<dd class="It-tag">output wasm binary file</dd>
<dt class="It-tag"><a class="selflink" href="#r"><b class="Fl" title="Fl" id="r">-r</b></a>,
<b class="Fl" title="Fl">-</b><b class="Fl" title="Fl">-relocatable</b></dt>
<dd class="It-tag">Create a relocatable wasm binary (suitable for linking with
e.g. lld)</dd>
<dt class="It-tag"><b class="Fl" title="Fl">-</b><b class="Fl" title="Fl">-no-canonicalize-leb128s</b></dt>
<dd class="It-tag">Write all LEB128 sizes as 5-bytes instead of their minimal
size</dd>
<dt class="It-tag"><b class="Fl" title="Fl">-</b><b class="Fl" title="Fl">-debug-names</b></dt>
<dd class="It-tag">Write debug names to the generated binary file</dd>
<dt class="It-tag"><b class="Fl" title="Fl">-</b><b class="Fl" title="Fl">-no-check</b></dt>
<dd class="It-tag">Don't check for invalid modules</dd>
</dl>
<h1 class="Sh" title="Sh" id="EXAMPLES"><a class="selflink" href="#EXAMPLES">EXAMPLES</a></h1>
Parse spec-test.wast, and write files to spec-test.json. Modules are written to
spec-test.0.wasm, spec-test.1.wasm, etc.
<div class="Pp"></div>
<div class="D1"><code class="Li">$ wast2json spec-test.wast -o
spec-test.json</code></div>
<h1 class="Sh" title="Sh" id="SEE_ALSO"><a class="selflink" href="#SEE_ALSO">SEE
ALSO</a></h1>
<a class="Xr" title="Xr" href="wasm-interp.1.html">wasm-interp(1)</a>,
<a class="Xr" title="Xr" href="wasm-objdump.1.html">wasm-objdump(1)</a>,
<a class="Xr" title="Xr" href="wasm-opcodecnt.1.html">wasm-opcodecnt(1)</a>,
<a class="Xr" title="Xr" href="wasm-strip.1.html">wasm-strip(1)</a>,
<a class="Xr" title="Xr" href="wasm-validate.1.html">wasm-validate(1)</a>,
<a class="Xr" title="Xr" href="wasm2c.1.html">wasm2c(1)</a>,
<a class="Xr" title="Xr" href="wasm2wat.1.html">wasm2wat(1)</a>,
<a class="Xr" title="Xr" href="wat-desugar.1.html">wat-desugar(1)</a>,
<a class="Xr" title="Xr" href="wat2wasm.1.html">wat2wasm(1)</a>,
<a class="Xr" title="Xr" href="spectest-interp.1.html">spectest-interp(1)</a>
<h1 class="Sh" title="Sh" id="BUGS"><a class="selflink" href="#BUGS">BUGS</a></h1>
If you find a bug, please report it at
<div> </div>
<a class="Lk" title="Lk" href="https://github.com/WebAssembly/wabt/issues">https://github.com/WebAssembly/wabt/issues</a>.</div>
<table class="foot">
<tr>
<td class="foot-date">December 17, 2018</td>
<td class="foot-os">Debian</td>
</tr>
</table>
</body>
</html>
|