andrewdavidmackenzie opened issue #3326:
Thanks for filing a feature request! Please fill out the TODOs below.
Feature
Have all available command line options show in the wasmtime CLI help text
Benefit
People will be able to discover the up-to-date list of options without going to the docs
Implementation
One option is to just add that (and other options we find missing) to the text in wasmtime.rs
Alternatives
Another option (which I would be willing to take a shot at if maintainers like the idea) would be
to use a CLI crate like clap to parse command line arguments and automatically be able to
generate accurate help text from the available options
andrewdavidmackenzie commented on issue #3326:
Here is current text for reference:
cargo run -- --help Finished dev [unoptimized + debuginfo] target(s) in 0.30s Running `target/debug/wasmtime --help` wasmtime 0.29.0 Wasmtime WebAssembly Runtime USAGE: wasmtime <SUBCOMMAND> FLAGS: -h, --help Prints help information -V, --version Prints version information SUBCOMMANDS: compile Compiles a WebAssembly module config Controls Wasmtime configuration settings help Prints this message or the help of the given subcommand(s) run Runs a WebAssembly module settings Displays available Cranelift settings for a target wast Runs a WebAssembly test script file If a subcommand is not provided, the `run` subcommand will be used. Usage examples: Running a WebAssembly module with a start function: wasmtime example.wasm Passing command line arguments to a WebAssembly module: wasmtime example.wasm arg1 arg2 arg3 Invoking a specific function (e.g. `add`) in a WebAssembly module: wasmtime example.wasm --invoke add 1 2
tschneidereit commented on issue #3326:
Thank you for the report! The
--dir
option, as well as many others, is shown when runningwasmtime help run
. We could consider having an explicit mention ofhelp [subcommand]
below the list of subcommands, but I'm not sure how much that'd help.Another option (which I would be willing to take a shot at if maintainers like the idea) would be
to use a CLI crate like clap to parse command line arguments and automatically be able to
generate accurate help text from the available optionsWe're using structopt for that already. The reason that's slightly less obvious is because all of the interesting bits are inside the various commands.
bjorn3 commented on issue #3326:
is shown when running
wasmtime help run
.It is also shown when running
wasmtime run --help
.
andrewdavidmackenzie commented on issue #3326:
Fair enough! I used "wasmtime help", "wasmtime --help", "wasm run" etc and just didn't hit the required combination.
Thanks for reply.
andrewdavidmackenzie closed issue #3326:
Thanks for filing a feature request! Please fill out the TODOs below.
Feature
Have all available command line options show in the wasmtime CLI help text
Benefit
People will be able to discover the up-to-date list of options without going to the docs
Implementation
One option is to just add that (and other options we find missing) to the text in wasmtime.rs
Alternatives
Another option (which I would be willing to take a shot at if maintainers like the idea) would be
to use a CLI crate like clap to parse command line arguments and automatically be able to
generate accurate help text from the available options
Last updated: Dec 23 2024 at 13:07 UTC