summaryrefslogtreecommitdiff
path: root/crates/cli/src/bin.rs
diff options
context:
space:
mode:
authorHenry <mail@henrygressmann.de>2026-04-26 17:55:48 +0200
committerHenry <mail@henrygressmann.de>2026-04-26 17:55:48 +0200
commit27004a8738c7a3c32ac4fb6966f32647b4c96db7 (patch)
treebc3d663d1dc246df20ed30b1ecd0c19935c0f8bb /crates/cli/src/bin.rs
parent40bd20bb77b611f7974036c9f2b152a16a46c32a (diff)
docs: rework documentation, prepare pre-release
Signed-off-by: Henry <mail@henrygressmann.de>
Diffstat (limited to 'crates/cli/src/bin.rs')
-rw-r--r--crates/cli/src/bin.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/crates/cli/src/bin.rs b/crates/cli/src/bin.rs
index 9b283c3..7e32fed 100644
--- a/crates/cli/src/bin.rs
+++ b/crates/cli/src/bin.rs
@@ -19,7 +19,7 @@ struct TinyWasmCli {
#[argh(subcommand)]
nested: TinyWasmSubcommand,
- /// log level
+ /// log level: trace, debug, info, warn, or error
#[argh(option, short = 'l', default = "\"info\".to_string()")]
log_level: String,
}
@@ -53,15 +53,15 @@ struct Run {
#[argh(positional)]
wasm_file: String,
- /// function to run
+ /// exported function to run; omit to only instantiate and run start
#[argh(option, short = 'f')]
func: Option<String>,
- /// arguments to pass to the wasm file
+ /// arguments passed to the function in type:value form
#[argh(option, short = 'a')]
args: Vec<WasmArg>,
- /// engine to use
+ /// engine to use (currently only `main`)
#[argh(option, short = 'e', default = "Engine::Main")]
engine: Engine,
}
@@ -74,7 +74,7 @@ fn main() -> Result<()> {
"warn" => log::LevelFilter::Warn,
"error" => log::LevelFilter::Error,
"info" => log::LevelFilter::Info,
- _ => log::LevelFilter::Info,
+ other => return Err(eyre::eyre!("invalid log level `{other}`; expected trace, debug, info, warn, or error")),
};
pretty_env_logger::formatted_builder().filter_level(level).init();