You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
use tauri::api::cli::get_matches;fnmain(){let context = tauri::generate_context!();let cli_config = context.config().tauri.cli.clone().unwrap();matchget_matches(&cli_config){// `matches` here is a Struct with { args, subcommand }.// `args` is `HashMap<String, ArgData>` where `ArgData` is a struct with { value, occurances }.// `subcommand` is `Option<Box<SubcommandMatches>>` where `SubcommandMatches` is a struct with { name, matches }.Ok(matches) => {println!("{:?}", matches)}Err(_) => {}};
tauri::Builder::default().run(context).expect("error while running tauri application");}
This code however is incorrect since the signature of the function get_matches has been changed and now requires two arguments:
https://tauri.studio/v1/guides/features/cli/#rust
On the documentation the page Making Your Own CLI has a section for reading matches with Rust, with the following code example:
This code however is incorrect since the signature of the function get_matches has been changed and now requires two arguments:
Trying to compile this will result in the following error:
The text was updated successfully, but these errors were encountered: