Cargo.toml 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  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.6/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. "mounted",
  16. "file_engine",
  17. ] }
  18. dioxus-document = { workspace = true }
  19. dioxus-signals = { workspace = true, optional = true }
  20. dioxus-interpreter-js = { workspace = true, features = ["binary-protocol", "serialize"] }
  21. dioxus-cli-config = { workspace = true }
  22. dioxus-asset-resolver = { workspace = true }
  23. generational-box = { workspace = true }
  24. # hotreload only works on desktop platforms.... mobile is still wip
  25. dioxus-devtools = { workspace = true, optional = true }
  26. serde = "1.0.136"
  27. serde_json = "1.0.79"
  28. thiserror = { workspace = true }
  29. tracing = { workspace = true }
  30. wry = { workspace = true, default-features = false, features = [
  31. "os-webview",
  32. "protocol",
  33. "drag-drop",
  34. ] }
  35. futures-channel = { workspace = true }
  36. tokio = { workspace = true, features = [
  37. "sync",
  38. "rt-multi-thread",
  39. "rt",
  40. "time",
  41. "macros",
  42. "fs",
  43. "io-util",
  44. ], optional = true }
  45. webbrowser = "0.8.0"
  46. infer = { workspace = true }
  47. dunce = { workspace = true }
  48. slab = { workspace = true }
  49. rustc-hash = { workspace = true }
  50. dioxus-hooks = { workspace = true }
  51. futures-util = { workspace = true }
  52. urlencoding = { workspace = true }
  53. async-trait = "0.1.68"
  54. tao = { workspace = true, features = ["rwh_05"] }
  55. once_cell = { workspace = true }
  56. dioxus-history.workspace = true
  57. base64.workspace = true
  58. [target.'cfg(unix)'.dependencies]
  59. signal-hook = "0.3.17"
  60. [target.'cfg(target_os = "linux")'.dependencies]
  61. wry = { workspace = true, features = [
  62. "os-webview",
  63. "protocol",
  64. "drag-drop",
  65. "linux-body"
  66. ] }
  67. [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]
  68. global-hotkey = "0.5.0"
  69. rfd = { version = "0.14", default-features = false, features = ["xdg-portal", "tokio"] }
  70. muda = { workspace = true }
  71. [target.'cfg(any(target_os = "windows",target_os = "macos",target_os = "linux"))'.dependencies]
  72. tray-icon = { workspace = true }
  73. [target.'cfg(target_os = "ios")'.dependencies]
  74. objc = "0.2.7"
  75. objc_id = "0.1.1"
  76. # use rustls on android
  77. [target.'cfg(target_os = "android")'.dependencies]
  78. tokio-tungstenite = { workspace = true, optional = true, features = ["rustls"]}
  79. jni = "0.21.1"
  80. ndk = { version = "0.9.0" }
  81. ndk-sys = { version = "0.6.0" }
  82. ndk-context = { version = "0.1.1" }
  83. # use native tls on other platforms
  84. [target.'cfg(not(target_os = "android"))'.dependencies]
  85. tokio-tungstenite = { workspace = true, optional = true, features = ["native-tls"]}
  86. [target.'cfg(target_os = "macos")'.dependencies]
  87. cocoa = "0.25"
  88. core-foundation = "0.9.3"
  89. objc = "0.2.7"
  90. [build-dependencies]
  91. lazy-js-bundle = { workspace = true }
  92. [features]
  93. default = ["tokio_runtime", "transparent", "devtools"]
  94. tokio_runtime = ["dep:tokio"]
  95. fullscreen = ["wry/fullscreen"]
  96. devtools = ["wry/devtools", "dep:dioxus-devtools", "dioxus-signals"]
  97. transparent = ["wry/transparent"]
  98. gnu = []
  99. [package.metadata.docs.rs]
  100. features = ["tokio_runtime", "devtools"]
  101. cargo-args = ["-Zunstable-options", "-Zrustdoc-scrape-examples"]
  102. default-features = false
  103. targets = [
  104. "x86_64-unknown-linux-gnu",
  105. "x86_64-pc-windows-msvc",
  106. "aarch64-apple-darwin",
  107. "aarch64-apple-ios",
  108. "aarch64-linux-android",
  109. "armv7-linux-androideabi",
  110. ]
  111. rustc-args = [ "--cfg", "docsrs" ]
  112. rustdoc-args = [ "--cfg", "docsrs" ]
  113. [dev-dependencies]
  114. dioxus = { workspace = true, features = ["desktop"] }
  115. exitcode = "1.1.2"
  116. reqwest = { workspace = true, features = ["json"] }
  117. http-range = { version = "0.1.5" }
  118. dioxus-ssr = { workspace = true, default-features = false }
  119. separator = "0.4.1"
  120. rand = { version = "0.8.4", features = ["small_rng"] }
  121. # These tests need to be run on the main thread, so they cannot use rust's test harness.
  122. [[test]]
  123. name = "check_events"
  124. path = "headless_tests/events.rs"
  125. harness = false
  126. [[test]]
  127. name = "check_rendering"
  128. path = "headless_tests/rendering.rs"
  129. harness = false
  130. [[test]]
  131. name = "check_eval"
  132. path = "headless_tests/eval.rs"
  133. harness = false