()
| 165 | } |
| 166 | |
| 167 | fn async_main() -> tracedecay::errors::Result<()> { |
| 168 | let args: Vec<String> = std::env::args().collect(); |
| 169 | if render_dynamic_command_help(&args) { |
| 170 | return Ok(()); |
| 171 | } |
| 172 | let cli = Cli::parse_from(args); |
| 173 | let runtime = tokio::runtime::Builder::new_multi_thread() |
| 174 | .enable_all() |
| 175 | .thread_stack_size(ASYNC_STACK_BYTES) |
| 176 | .build() |
| 177 | .map_err(|e| tracedecay::errors::TraceDecayError::Config { |
| 178 | message: format!("failed to start async runtime: {e}"), |
| 179 | })?; |
| 180 | runtime.block_on(run(cli)) |
| 181 | } |
| 182 | |
| 183 | fn render_dynamic_command_help(args: &[String]) -> bool { |
| 184 | let command_args = args.get(1..).unwrap_or_default(); |
nothing calls this directly
no test coverage detected