| 1 | // The app's own commands (src/bridge.rs) each get a permission, |
| 2 | // `allow-<command>`, so a page can call only what its capability grants: |
| 3 | // the launcher and the settings window theirs (capabilities/), the site |
| 4 | // and GitHub's sign-in pages theirs, given at run time (src/config.rs). |
| 5 | // Without these, Tauri lets no remote page call an app command at all. |
| 6 | fn main() { |
| 7 | tauri_build::try_build(tauri_build::Attributes::new().app_manifest(tauri_build::AppManifest::new().commands(&[ |
| 8 | "desktop_info", |
| 9 | "notify", |
| 10 | "set_badge", |
| 11 | "open_url", |
| 12 | "reachable", |
| 13 | "set_server", |
| 14 | "check_for_updates", |
| 15 | "open_settings", |
| 16 | "get_settings", |
| 17 | "save_settings", |
| 18 | "set_open_at_login", |
| 19 | "change_server", |
| 20 | "restart_to_update", |
| 21 | "restart", |
| 22 | "window_control", |
| 23 | "window_menu", |
| 24 | "title_bar_page", |
| 25 | "title_bar_current", |
| 26 | "title_bar_act", |
| 27 | "runner_status", |
| 28 | "runner_offer", |
| 29 | "runner_register", |
| 30 | "runner_control", |
| 31 | ]))) |
| 32 | .expect("the app's build could not be prepared"); |
| 33 | } |