summaryrefslogtreecommitdiff
path: root/src/wasm-wast.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/wasm-wast.c')
-rw-r--r--src/wasm-wast.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/wasm-wast.c b/src/wasm-wast.c
index c47c709d..5f0765f5 100644
--- a/src/wasm-wast.c
+++ b/src/wasm-wast.c
@@ -54,6 +54,17 @@ enum {
NUM_FLAGS
};
+static const char s_description[] =
+ " read a file in the wasm binary format, and convert it to the wasm\n"
+ " s-expression file format.\n"
+ "\n"
+ "examples:\n"
+ " # parse binary file test.wasm and write s-expression file test.wast\n"
+ " $ wasm-wast test.wasm -o test.wast\n"
+ "\n"
+ " # parse test.wasm and write test.wast, using the debug names, if any\n"
+ " $ wasm-wast test.wasm --debug-names -o test.wast\n";
+
static WasmOption s_options[] = {
{FLAG_VERBOSE, 'v', "verbose", NULL, NOPE,
"use multiple times for more info"},
@@ -112,6 +123,7 @@ static void on_option_error(struct WasmOptionParser* parser,
static void parse_options(int argc, char** argv) {
WasmOptionParser parser;
WASM_ZERO_MEMORY(parser);
+ parser.description = s_description;
parser.options = s_options;
parser.num_options = WASM_ARRAY_SIZE(s_options);
parser.on_option = on_option;