Cargo.toml 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211
  1. [package]
  2. name = "dioxus-desktop"
  3. version = { workspace = true }
  4. authors = ["Jonathan Kelley"]
  5. edition = "2021"
  6. description = "WebView renderer for Dioxus"
  7. license = "MIT OR Apache-2.0"
  8. repository = "https://github.com/DioxusLabs/dioxus/"
  9. homepage = "https://dioxuslabs.com/learn/0.5/getting_started"
  10. keywords = ["dom", "ui", "gui", "react"]
  11. [dependencies]
  12. dioxus-core = { workspace = true, features = ["serialize"] }
  13. dioxus-html = { workspace = true, features = [
  14. "serialize",
  15. "native-bind",
  16. "mounted",
  17. "document",
  18. ] }
  19. dioxus-signals = { workspace = true, optional = true }
  20. dioxus-interpreter-js = { workspace = true, features = ["binary-protocol"] }
  21. dioxus-cli-config = { workspace = true, features = ["read-config"] }
  22. generational-box = { workspace = true }
  23. # hotreload only works on desktop platforms.... mobile is still wip
  24. dioxus-hot-reload = { workspace = true, optional = true, features = ["serve", "client"]}
  25. serde = "1.0.136"
  26. serde_json = "1.0.79"
  27. thiserror = { workspace = true }
  28. tracing = { workspace = true }
  29. wry = { version = "0.41.0", default-features = false, features = [
  30. "os-webview",
  31. "protocol",
  32. "drag-drop",
  33. ] }
  34. futures-channel = { workspace = true }
  35. tokio = { workspace = true, features = [
  36. "sync",
  37. "rt-multi-thread",
  38. "rt",
  39. "time",
  40. "macros",
  41. "fs",
  42. ], optional = true }
  43. webbrowser = "0.8.0"
  44. infer = "0.11.0"
  45. dunce = "1.0.2"
  46. slab = { workspace = true }
  47. rustc-hash = { workspace = true }
  48. dioxus-hooks = { workspace = true }
  49. futures-util = { workspace = true }
  50. urlencoding = "2.1.2"
  51. async-trait = "0.1.68"
  52. tao = { version = "0.26.1", features = ["rwh_05"] }
  53. [target.'cfg(unix)'.dependencies]
  54. signal-hook = "0.3.17"
  55. [target.'cfg(any(target_os = "windows",target_os = "macos",target_os = "linux",target_os = "dragonfly", target_os = "freebsd", target_os = "netbsd", target_os = "openbsd"))'.dependencies]
  56. global-hotkey = "0.5.0"
  57. rfd = "0.14"
  58. muda = "0.11.3"
  59. [target.'cfg(target_os = "ios")'.dependencies]
  60. objc = "0.2.7"
  61. objc_id = "0.1.1"
  62. # use rustls on android
  63. [target.'cfg(target_os = "android")'.dependencies]
  64. tokio-tungstenite = { workspace = true, optional = true, features = ["rustls"]}
  65. # use native tls on other platforms
  66. [target.'cfg(not(target_os = "android"))'.dependencies]
  67. tokio-tungstenite = { workspace = true, optional = true, features = ["native-tls"]}
  68. [target.'cfg(target_os = "macos")'.dependencies]
  69. cocoa = "0.25"
  70. core-foundation = "0.9.3"
  71. objc = "0.2.7"
  72. [features]
  73. default = ["tokio_runtime", "wry/objc-exception", "hot-reload", "devtools"]
  74. tokio_runtime = ["dep:tokio"]
  75. fullscreen = ["wry/fullscreen"]
  76. transparent = ["wry/transparent"]
  77. devtools = ["wry/devtools"]
  78. hot-reload = ["dep:dioxus-hot-reload", "dioxus-signals"]
  79. gnu = []
  80. [package.metadata.docs.rs]
  81. default-features = false
  82. features = ["tokio_runtime", "hot-reload"]
  83. cargo-args = ["-Zunstable-options", "-Zrustdoc-scrape-examples"]
  84. [dev-dependencies]
  85. dioxus = { workspace = true, features = ["desktop"] }
  86. exitcode = "1.1.2"
  87. reqwest = { workspace = true, features = ["json"] }
  88. http-range = { version = "0.1.5" }
  89. dioxus-ssr = { workspace = true, version = "0.5.0", default-features = false }
  90. separator = "0.4.1"
  91. rand = { version = "0.8.4", features = ["small_rng"] }
  92. # These tests need to be run on the main thread, so they cannot use rust's test harness.
  93. [[test]]
  94. name = "check_events"
  95. path = "headless_tests/events.rs"
  96. harness = false
  97. [[test]]
  98. name = "check_rendering"
  99. path = "headless_tests/rendering.rs"
  100. harness = false
  101. [[test]]
  102. name = "check_eval"
  103. path = "headless_tests/eval.rs"
  104. harness = false
  105. # Most of the examples live in the workspace. We include some here so that docs.rs can scrape our examples for better inline docs
  106. [[example]]
  107. name = "video_stream"
  108. path = "../../examples/video_stream.rs"
  109. doc-scrape-examples = true
  110. [[example]]
  111. name = "suspense"
  112. path = "../../examples/suspense.rs"
  113. doc-scrape-examples = true
  114. [[example]]
  115. name = "calculator_mutable"
  116. path = "../../examples/calculator_mutable.rs"
  117. doc-scrape-examples = true
  118. [[example]]
  119. name = "custom_html"
  120. path = "../../examples/custom_html.rs"
  121. doc-scrape-examples = true
  122. [[example]]
  123. name = "custom_menu"
  124. path = "../../examples/custom_menu.rs"
  125. doc-scrape-examples = true
  126. [[example]]
  127. name = "errors"
  128. path = "../../examples/errors.rs"
  129. doc-scrape-examples = true
  130. [[example]]
  131. name = "file_explorer"
  132. path = "../../examples/file_explorer.rs"
  133. doc-scrape-examples = true
  134. [[example]]
  135. name = "future"
  136. path = "../../examples/future.rs"
  137. doc-scrape-examples = true
  138. [[example]]
  139. name = "hydration"
  140. path = "../../examples/hydration.rs"
  141. doc-scrape-examples = true
  142. [[example]]
  143. name = "multiwindow"
  144. path = "../../examples/multiwindow.rs"
  145. doc-scrape-examples = true
  146. [[example]]
  147. name = "overlay"
  148. path = "../../examples/overlay.rs"
  149. doc-scrape-examples = true
  150. [[example]]
  151. name = "popup"
  152. path = "../../examples/popup.rs"
  153. doc-scrape-examples = true
  154. [[example]]
  155. name = "read_size"
  156. path = "../../examples/read_size.rs"
  157. doc-scrape-examples = true
  158. [[example]]
  159. name = "shortcut"
  160. path = "../../examples/shortcut.rs"
  161. doc-scrape-examples = true
  162. [[example]]
  163. name = "streams"
  164. path = "../../examples/streams.rs"
  165. doc-scrape-examples = true
  166. [[example]]
  167. name = "window_event"
  168. path = "../../examples/window_event.rs"
  169. doc-scrape-examples = true
  170. [[example]]
  171. name = "window_focus"
  172. path = "../../examples/window_focus.rs"
  173. doc-scrape-examples = true
  174. [[example]]
  175. name = "window_zoom"
  176. path = "../../examples/window_zoom.rs"
  177. doc-scrape-examples = true