Cargo.toml 4.3 KB

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