Cargo.toml 4.0 KB

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