blob: 91bdd61dbd02206f40f15a9b51c73cb302bb1b7b (
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
|
;;; EXE: %(wast2wasm)s
;;; FLAGS: --help
(;; STDOUT ;;;
usage: wast2wasm [options] filename
read a file in the wasm s-expression format, check it for errors, and
convert it to the wasm binary format.
examples:
# parse and typecheck test.wast
$ wast2wasm test.wast
# parse test.wast and write to binary file test.wasm
$ wast2wasm test.wast -o test.wasm
# parse spec-test.wast, and write verbose output to stdout (including
# the meaning of every byte)
$ wast2wasm spec-test.wast -v
# parse spec-test.wast, and write files to spec-test.json. Modules are
# written to spec-test.0.wasm, spec-test.1.wasm, etc.
$ wast2wasm spec-test.wast --spec -o spec-test.json
options:
-v, --verbose use multiple times for more info
-h, --help print this help message
-d, --dump-module print a hexdump of the module to stdout
-o, --output=FILE output file for the generated binary format
--spec parse a file with multiple modules and assertions, like the spec tests
--use-libc-allocator use malloc, free, etc. instead of stack allocator
--no-canonicalize-leb128s Write all LEB128 sizes as 5-bytes instead of their minimal size
--debug-names Write debug names to the generated binary file
--no-check Don't check for invalid modules
--no-check-assert-invalid-and-malformed Don't run the assert_invalid or assert_malformed checks
;;; STDOUT ;;)
|