build.rs 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. // Copyright 2019-2021 Tauri Programme within The Commons Conservancy
  2. // SPDX-License-Identifier: Apache-2.0
  3. // SPDX-License-Identifier: MIT
  4. use cfg_aliases::cfg_aliases;
  5. fn main() {
  6. cfg_aliases! {
  7. custom_protocol: { feature = "custom-protocol" },
  8. dev: { not(feature = "custom-protocol") },
  9. api_all: { feature = "api-all" },
  10. // fs
  11. fs_all: { any(api_all, feature = "fs-all") },
  12. fs_read_text_file: { any(fs_all, feature = "fs-read-text-file") },
  13. fs_read_binary_file: { any(fs_all, feature = "fs-read-binary-file") },
  14. fs_write_file: { any(fs_all, feature = "fs-write-file") },
  15. fs_write_binary_file: { any(fs_all, feature = "fs-write-binary-file") },
  16. fs_read_dir: { any(fs_all, feature = "fs-read-dir") },
  17. fs_copy_file: { any(fs_all, feature = "fs-copy-file") },
  18. fs_create_dir: { any(fs_all, feature = "fs-create_dir") },
  19. fs_remove_dir: { any(fs_all, feature = "fs-remove-dir") },
  20. fs_remove_file: { any(fs_all, feature = "fs-remove-file") },
  21. fs_rename_file: { any(fs_all, feature = "fs-rename-file") },
  22. // window
  23. window_all: { any(api_all, feature = "window-all") },
  24. window_create: { any(window_all, feature = "window-create") },
  25. // shell
  26. shell_all: { any(api_all, feature = "shell-all") },
  27. shell_open: { any(shell_all, feature = "shell-open") },
  28. shell_execute: { any(shell_all, feature = "shell-execute") },
  29. // dialog
  30. dialog_all: { any(api_all, feature = "dialog-all") },
  31. dialog_open: { any(dialog_all, feature = "dialog-open") },
  32. dialog_save: { any(dialog_all, feature = "dialog-save") },
  33. // http
  34. http_all: { any(api_all, feature = "http-all") },
  35. http_request: { any(http_all, feature = "http-request") },
  36. // cli
  37. cli: { feature = "cli" },
  38. // notification
  39. notification_all: { any(api_all, feature = "notification-all") },
  40. // global shortcut
  41. global_shortcut_all: { any(api_all, feature = "global_shortcut-all") },
  42. // os
  43. os_all: { any(api_all, feature = "os-all") },
  44. // path
  45. path_all: { any(api_all, feature = "path-all") },
  46. }
  47. }