build.rs 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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. all_api: { feature = "all-api" },
  7. // fs
  8. read_text_file: { any(all_api, feature = "read-text-file") },
  9. read_binary_file: { any(all_api, feature = "read-binary-file") },
  10. write_file: { any(all_api, feature = "write-file") },
  11. write_binary_file: { any(all_api, feature = "write-binary-file") },
  12. read_dir: { any(all_api, feature = "read-dir") },
  13. copy_file: { any(all_api, feature = "copy-file") },
  14. create_dir: { any(all_api, feature = "create_dir") },
  15. remove_dir: { any(all_api, feature = "remove-dir") },
  16. remove_file: { any(all_api, feature = "remove-file") },
  17. rename_file: { any(all_api, feature = "rename-file") },
  18. // js path api
  19. path_api: { any(all_api, feature = "path-api") },
  20. // window
  21. set_title: { any(all_api, feature = "set-title") },
  22. open: { any(all_api, feature = "open") },
  23. // process
  24. execute: { any(all_api, feature = "execute") },
  25. // event
  26. event: { any(all_api, feature = "event") },
  27. // dialog
  28. open_dialog: { any(all_api, feature = "open-dialog") },
  29. save_dialog: { any(all_api, feature = "save-dialog") },
  30. // http
  31. http_request: { any(all_api, feature = "http-request") },
  32. // cli
  33. cli: { feature = "cli" },
  34. // notification
  35. notification: { any(all_api, feature = "notification") },
  36. }
  37. }