Mercerenies / fifi-calculator

1 stars 0 forks source link

Revisit how to organize #[tauri::command]s #27

Closed Mercerenies closed 4 weeks ago

Mercerenies commented 1 month ago

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.

Mercerenies commented 4 weeks ago

Closed by 2593650, commands are all in a separate file now.