build.rs 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. use cfg_aliases::cfg_aliases;
  2. fn main() {
  3. cfg_aliases! {
  4. embedded_server: { feature = "embedded-server" },
  5. no_server: { feature = "no-server" },
  6. assets: { any(feature = "embedded-server", feature = "no-server") },
  7. dev: { not(any(feature = "embedded-server", feature = "no-server")) },
  8. all_api: { feature = "all-api" },
  9. // fs
  10. read_text_file: { any(all_api, feature = "read-text-file") },
  11. read_binary_file: { any(all_api, feature = "read-binary-file") },
  12. write_file: { any(all_api, feature = "write-file") },
  13. write_binary_file: { any(all_api, feature = "write-binary-file") },
  14. read_dir: { any(all_api, feature = "read-dir") },
  15. copy_file: { any(all_api, feature = "copy-file") },
  16. create_dir: { any(all_api, feature = "create_dir") },
  17. remove_dir: { any(all_api, feature = "remove-dir") },
  18. remove_file: { any(all_api, feature = "remove-file") },
  19. rename_file: { any(all_api, feature = "rename-file") },
  20. // js path api
  21. path_api: { any(all_api, feature = "path-api") },
  22. // window
  23. set_title: { any(all_api, feature = "set-title") },
  24. open: { any(all_api, feature = "open") },
  25. // process
  26. execute: { any(all_api, feature = "execute") },
  27. // event
  28. event: { any(all_api, feature = "event") },
  29. // dialog
  30. open_dialog: { any(all_api, feature = "open-dialog") },
  31. save_dialog: { any(all_api, feature = "save-dialog") },
  32. // http
  33. http_request: { any(all_api, feature = "http-request") },
  34. // cli
  35. cli: { feature = "cli" },
  36. // notification
  37. notification: { any(all_api, feature = "notification") },
  38. }
  39. }