build.rs 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. use cfg_aliases::cfg_aliases;
  2. fn main() {
  3. cfg_aliases! {
  4. embedded_server: { feature = "embedded-server" },
  5. dev: { not(feature = "embedded-server") },
  6. api_all: { feature = "api-all" },
  7. // fs
  8. fs_all: { any(api_all, feature = "fs-all") },
  9. fs_read_text_file: { any(fs_all, feature = "fs-read-text-file") },
  10. fs_read_binary_file: { any(fs_all, feature = "fs-read-binary-file") },
  11. fs_write_file: { any(fs_all, feature = "fs-write-file") },
  12. fs_write_binary_file: { any(fs_all, feature = "fs-write-binary-file") },
  13. fs_read_dir: { any(fs_all, feature = "fs-read-dir") },
  14. fs_copy_file: { any(fs_all, feature = "fs-copy-file") },
  15. fs_create_dir: { any(fs_all, feature = "fs-create_dir") },
  16. fs_remove_dir: { any(fs_all, feature = "fs-remove-dir") },
  17. fs_remove_file: { any(fs_all, feature = "fs-remove-file") },
  18. fs_rename_file: { any(fs_all, feature = "fs-rename-file") },
  19. fs_path: { any(fs_all, feature = "fs-path") },
  20. // window
  21. window_all: { any(api_all, feature = "window-all") },
  22. window_create: { any(window_all, feature = "window-create") },
  23. // shell
  24. shell_all: { any(api_all, feature = "shell-all") },
  25. shell_open: { any(shell_all, feature = "shell-open") },
  26. shell_execute: { any(shell_all, feature = "shell-execute") },
  27. // dialog
  28. dialog_all: { any(api_all, feature = "dialog-all") },
  29. dialog_open: { any(dialog_all, feature = "dialog-open") },
  30. dialog_save: { any(dialog_all, feature = "dialog-save") },
  31. // http
  32. http_all: { any(api_all, feature = "http-all") },
  33. http_request: { any(http_all, feature = "http-request") },
  34. // cli
  35. cli: { feature = "cli" },
  36. // notification
  37. notification_all: { any(api_all, feature = "notification-all") },
  38. // global shortcut
  39. global_shortcut_all: { any(api_all, feature = "global_shortcut-all") },
  40. }
  41. }