Currently, tauri::commands are all just written in main.rs, which is a disorganized mess, uses a lot of common functionality multiple times, and is hard to unit test.
#[tauri::command], the macro, seems difficult to get out of main.rs, for technical reasons (Tauri generates some private names in the same module, that it seems to depend on). But the actual functionality can easily be moved elsewhere, and then we can write simple macro-based wrappers around it.
Currently,
tauri::command
s are all just written inmain.rs
, which is a disorganized mess, uses a lot of common functionality multiple times, and is hard to unit test.#[tauri::command]
, the macro, seems difficult to get out ofmain.rs
, for technical reasons (Tauri generates some private names in the same module, that it seems to depend on). But the actual functionality can easily be moved elsewhere, and then we can write simple macro-based wrappers around it.