1
0

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