main.rs 595 B

1234567891011121314151617181920
  1. // Copyright 2019-2021 Tauri Programme within The Commons Conservancy
  2. // SPDX-License-Identifier: Apache-2.0
  3. // SPDX-License-Identifier: MIT
  4. #![cfg_attr(
  5. all(not(debug_assertions), target_os = "windows"),
  6. windows_subsystem = "windows"
  7. )]
  8. fn main() {
  9. let context = tauri::generate_context!("../../examples/helloworld/tauri.conf.json");
  10. tauri::Builder::default()
  11. .menu(if cfg!(target_os = "macos") {
  12. tauri::Menu::os_default(&context.package_info().name)
  13. } else {
  14. tauri::Menu::default()
  15. })
  16. .run(context)
  17. .expect("error while running tauri application");
  18. }