Cargo.toml 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531
  1. [workspace]
  2. resolver = "2"
  3. members = [
  4. "packages/dioxus",
  5. "packages/dioxus-lib",
  6. "packages/core",
  7. "packages/core-types",
  8. "packages/cli",
  9. "packages/cli-opt",
  10. "packages/core-types",
  11. "packages/core-macro",
  12. "packages/config-macro",
  13. "packages/router-macro",
  14. "packages/extension",
  15. "packages/router",
  16. "packages/html",
  17. "packages/html-internal-macro",
  18. "packages/hooks",
  19. "packages/web",
  20. "packages/ssr",
  21. "packages/desktop",
  22. "packages/mobile",
  23. "packages/interpreter",
  24. "packages/liveview",
  25. "packages/autofmt",
  26. "packages/check",
  27. "packages/cli-config",
  28. "packages/cli",
  29. "packages/config-macro",
  30. "packages/core-macro",
  31. "packages/core-types",
  32. "packages/core",
  33. "packages/desktop",
  34. "packages/devtools-types",
  35. "packages/devtools",
  36. "packages/dioxus-lib",
  37. "packages/dioxus",
  38. "packages/document",
  39. "packages/extension",
  40. "packages/fullstack",
  41. "packages/generational-box",
  42. "packages/history",
  43. "packages/hooks",
  44. "packages/html-internal-macro",
  45. "packages/html",
  46. "packages/interpreter",
  47. "packages/lazy-js-bundle",
  48. "packages/liveview",
  49. "packages/mobile",
  50. "packages/router-macro",
  51. "packages/router",
  52. "packages/rsx-hotreload",
  53. "packages/rsx-rosetta",
  54. "packages/rsx",
  55. "packages/server-macro",
  56. "packages/signals",
  57. "packages/ssr",
  58. "packages/lazy-js-bundle",
  59. "packages/cli-config",
  60. "packages/devtools",
  61. "packages/devtools-types",
  62. "packages/isrg",
  63. "packages/rsx-hotreload",
  64. "packages/const-serialize",
  65. "packages/const-serialize-macro",
  66. "packages/dx-wire-format",
  67. "packages/logger",
  68. "packages/config-macros",
  69. # manganis
  70. "packages/manganis/manganis",
  71. "packages/manganis/manganis-core",
  72. "packages/manganis/manganis-macro",
  73. # wasm-split
  74. "packages/wasm-split/wasm-split",
  75. "packages/wasm-split/wasm-split-macro",
  76. "packages/wasm-split/wasm-split-cli",
  77. "packages/wasm-split/wasm-used",
  78. # Full project examples
  79. "example-projects/fullstack-hackernews",
  80. "example-projects/ecommerce-site",
  81. "example-projects/wifi-scanner",
  82. "example-projects/file-explorer",
  83. # Simple examples that require a crate
  84. "examples/tailwind",
  85. "examples/pwa",
  86. "examples/fullstack-hello-world",
  87. "examples/fullstack-router",
  88. "examples/fullstack-streaming",
  89. "examples/fullstack-desktop",
  90. "examples/fullstack-auth",
  91. # Playwright tests
  92. "packages/playwright-tests/liveview",
  93. "packages/playwright-tests/web",
  94. "packages/playwright-tests/fullstack",
  95. "packages/playwright-tests/fullstack-mounted",
  96. "packages/playwright-tests/suspense-carousel",
  97. "packages/playwright-tests/nested-suspense",
  98. "packages/playwright-tests/cli-optimization",
  99. "packages/playwright-tests/wasm-split-harness",
  100. ]
  101. [workspace.package]
  102. version = "0.6.3"
  103. # dependencies that are shared across packages
  104. [workspace.dependencies]
  105. dioxus = { path = "packages/dioxus", version = "0.6.2" }
  106. dioxus-lib = { path = "packages/dioxus-lib", version = "0.6.2" }
  107. dioxus-core = { path = "packages/core", version = "0.6.2" }
  108. dioxus-core-types = { path = "packages/core-types", version = "0.6.2" }
  109. dioxus-core-macro = { path = "packages/core-macro", version = "0.6.2" }
  110. dioxus-config-macro = { path = "packages/config-macro", version = "0.6.2" }
  111. dioxus-router = { path = "packages/router", version = "0.6.2" }
  112. dioxus-router-macro = { path = "packages/router-macro", version = "0.6.2" }
  113. dioxus-document = { path = "packages/document", version = "0.6.2", default-features = false }
  114. dioxus-history = { path = "packages/history", version = "0.6.2", default-features = false }
  115. dioxus-html = { path = "packages/html", version = "0.6.2", default-features = false }
  116. dioxus-html-internal-macro = { path = "packages/html-internal-macro", version = "0.6.2" }
  117. dioxus-hooks = { path = "packages/hooks", version = "0.6.2" }
  118. dioxus-web = { path = "packages/web", version = "0.6.2", default-features = false }
  119. dioxus-isrg = { path = "packages/isrg", version = "0.6.2" }
  120. dioxus-ssr = { path = "packages/ssr", version = "0.6.2", default-features = false }
  121. dioxus-desktop = { path = "packages/desktop", version = "0.6.2", default-features = false }
  122. dioxus-mobile = { path = "packages/mobile", version = "0.6.2" }
  123. dioxus-interpreter-js = { path = "packages/interpreter", version = "0.6.2" }
  124. dioxus-liveview = { path = "packages/liveview", version = "0.6.2" }
  125. dioxus-autofmt = { path = "packages/autofmt", version = "0.6.2" }
  126. dioxus-check = { path = "packages/check", version = "0.6.2" }
  127. dioxus-rsx = { path = "packages/rsx", version = "0.6.2" }
  128. dioxus-rsx-hotreload = { path = "packages/rsx-hotreload", version = "0.6.2" }
  129. dioxus-rsx-rosetta = { path = "packages/rsx-rosetta", version = "0.6.2" }
  130. dioxus-signals = { path = "packages/signals", version = "0.6.2" }
  131. dioxus-cli-config = { path = "packages/cli-config", version = "0.6.2" }
  132. dioxus-cli-opt = { path = "packages/cli-opt", version = "0.6.2" }
  133. dioxus-devtools = { path = "packages/devtools", version = "0.6.2" }
  134. dioxus-devtools-types = { path = "packages/devtools-types", version = "0.6.2" }
  135. dioxus-fullstack = { path = "packages/fullstack", version = "0.6.2" }
  136. dioxus_server_macro = { path = "packages/server-macro", version = "0.6.2", default-features = false }
  137. dioxus-dx-wire-format = { path = "packages/dx-wire-format", version = "0.6.2" }
  138. dioxus-logger = { path = "packages/logger", version = "0.6.2" }
  139. dioxus-config-macros = { path = "packages/config-macros", version = "0.6.3" }
  140. const-serialize = { path = "packages/const-serialize", version = "0.6.2" }
  141. const-serialize-macro = { path = "packages/const-serialize-macro", version = "0.6.2" }
  142. generational-box = { path = "packages/generational-box", version = "0.6.2" }
  143. lazy-js-bundle = { path = "packages/lazy-js-bundle", version = "0.6.2" }
  144. manganis = { path = "packages/manganis/manganis", version = "0.6.2" }
  145. manganis-core = { path = "packages/manganis/manganis-core", version = "0.6.2" }
  146. manganis-macro = { path = "packages/manganis/manganis-macro", version = "0.6.2" }
  147. wasm-split = { path = "packages/wasm-split/wasm-split", version = "0.1.0" }
  148. wasm-split-macro = { path = "packages/wasm-split/wasm-split-macro", version = "0.1.0" }
  149. wasm-split-cli = { path = "packages/wasm-split/wasm-split-cli", version = "0.1.0" }
  150. wasm-split-harness = { path = "packages/playwright-tests/wasm-split-harness", version = "0.1.0" }
  151. warnings = { version = "0.2.1" }
  152. # a fork of pretty please for tests - let's get off of this if we can!
  153. prettier-please = { version = "0.3.0", features = ["verbatim"]}
  154. anyhow = "1.0.95"
  155. clap = { version = "4.5.7" }
  156. askama_escape = "0.10.3"
  157. tracing = "0.1.37"
  158. tracing-futures = "0.2.5"
  159. tracing-subscriber = { version = "0.3.18", default-features = false }
  160. toml = "0.8"
  161. tokio = "1.40"
  162. slab = "0.4.2"
  163. slotmap = { version = "1.0.7", features = ["serde"] }
  164. futures = "0.3.31"
  165. futures-channel = "0.3.31"
  166. futures-util = { version = "0.3", default-features = false }
  167. rustc-hash = "1.1.0"
  168. wasm-bindgen = "0.2.99"
  169. wasm-bindgen-futures = "0.4.42"
  170. js-sys = "0.3.76"
  171. web-sys = { version = "0.3.76", default-features = false }
  172. html_parser = "0.7.0"
  173. thiserror = "1.0.40"
  174. prettyplease = { version = "0.2.20", features = ["verbatim"] }
  175. const_format = "0.2.32"
  176. cargo_toml = { version = "0.20.3" }
  177. tauri-utils = { version = "=2.0.2" }
  178. tauri-bundler = { version = "=2.0.4" }
  179. lru = "0.12.2"
  180. async-trait = "0.1.77"
  181. axum = "0.7.0"
  182. axum-server = { version = "0.7.1", default-features = false }
  183. tower = "0.4.13"
  184. http = "1.0.0"
  185. notify = { version = "6.1.1" }
  186. tower-http = "0.5.2"
  187. hyper = "1.0.0"
  188. hyper-rustls = { version= "0.27.2", default-features = false , features=["native-tokio","http1","http2","tls12","logging","ring"]}
  189. rustls = { version="0.23.12", default-features=false, features =["logging","std","tls12","ring"] }
  190. serde_json = "1.0.61"
  191. serde = "1.0.61"
  192. syn = "2.0"
  193. quote = "1.0"
  194. proc-macro2 = "1.0"
  195. axum_session = "0.12.1"
  196. axum_session_auth = "0.12.1"
  197. axum-extra = "0.9.2"
  198. reqwest = "0.12.5"
  199. owo-colors = "4.0.0"
  200. ciborium = "0.2.1"
  201. base64 = "0.22.1"
  202. once_cell = "1.17.1"
  203. uuid = "1.9.1"
  204. convert_case = "0.6.0"
  205. tokio-tungstenite = { version = "0.23.1" }
  206. gloo-timers = "0.3.0"
  207. fluent-uri = { version = "0.2.0", features = ["serde"] }
  208. internment = { version = "0.7.0" }
  209. proc-macro2-diagnostics = { version = "0.10", default-features = false }
  210. env_logger = "0.11.0"
  211. chrono = { version = "0.4.34" }
  212. gloo = { version = "0.8.0" }
  213. gloo-utils = { version = "0.1.6" }
  214. rustversion = "1.0.17"
  215. rand = "0.8.5"
  216. longest-increasing-subsequence = "0.1.0"
  217. trybuild = "1.0"
  218. dirs = "5.0.1"
  219. cargo-config2 = "0.1.26"
  220. criterion = { version = "0.5" }
  221. cargo_metadata = "0.18.1"
  222. parking_lot = "0.12.1"
  223. tracing-wasm = "0.2.1"
  224. console_error_panic_hook = "0.1.7"
  225. base16 = "0.2.1"
  226. digest = "0.10.7"
  227. sha2 = "0.10.8"
  228. walrus = { version = "0.23.2", features = ["parallel"] }
  229. id-arena = "2.2.1"
  230. async-compression = { version = "0.4.8", features = ["futures-io", "gzip", "brotli"] }
  231. getrandom = { version = "0.2" }
  232. async-once-cell = { version = "0.5.3" }
  233. rayon = "1.2.0"
  234. wasmparser = "0.225.0"
  235. itertools = "0.14.0"
  236. macro-string = "0.1.3"
  237. # desktop
  238. wry = { version = "0.45.0", default-features = false }
  239. tao = { version = "0.30.8", features = ["rwh_05"] }
  240. webbrowser = "1.0.1"
  241. infer = "0.16.0"
  242. dunce = "1.0.5"
  243. urlencoding = "2.1.2"
  244. global-hotkey = "0.6.0"
  245. rfd = { version = "0.14", default-features = false }
  246. muda = "0.14.0"
  247. cocoa = "0.26"
  248. core-foundation = "0.10.0"
  249. objc = { version = "0.2.7", features = ["exception"] }
  250. objc_id = "0.1.1"
  251. tray-icon = "0.19"
  252. # disable debug symbols in dev builds - shouldn't matter for downstream crates but makes our binaries (examples, cli, etc) build faster
  253. [profile.dev]
  254. debug = 0
  255. # our release profile should be fast to compile and fast to run
  256. # when we ship our CI builds, we turn on LTO which improves perf leftover by turning on incremental
  257. [profile.release]
  258. incremental = true
  259. # crank up the opt level for wasm-split-cli in dev mode
  260. # important here that lto is on and the debug symbols are presenta (since they're used by wasm-opt)a
  261. [profile.wasm-split-release]
  262. inherits = "release"
  263. opt-level = 'z'
  264. lto = true
  265. debug=true
  266. # a profile for running the CLI that's also incremental
  267. [profile.cli-release-dev]
  268. inherits = "release"
  269. opt-level = 3
  270. incremental = true
  271. # crank up walrus since it's quite slow in dev mode
  272. [profile.dev.package.walrus]
  273. opt-level = 3
  274. [profile.release-max-opt]
  275. inherits = "release"
  276. lto = true
  277. codegen-units = 1
  278. # Disable debug assertions to check the released path of core and other packages, but build without optimizations to keep build times quick
  279. [profile.release-unoptimized]
  280. inherits = "dev"
  281. debug-assertions = false
  282. incremental = true
  283. [profile.wasm-dev]
  284. inherits = "dev"
  285. opt-level = 1
  286. [profile.server-dev]
  287. inherits = "dev"
  288. [profile.android-dev]
  289. inherits = "dev"
  290. # This is a "virtual package"
  291. # It is not meant to be published, but is used so "cargo run --example XYZ" works properly
  292. [package]
  293. name = "dioxus-examples"
  294. authors = ["Jonathan Kelley"]
  295. edition = "2021"
  296. description = "Top level crate for the Dioxus repository"
  297. license = "MIT OR Apache-2.0"
  298. repository = "https://github.com/DioxusLabs/dioxus/"
  299. homepage = "https://dioxuslabs.com"
  300. documentation = "https://dioxuslabs.com"
  301. keywords = ["dom", "ui", "gui", "react", "wasm"]
  302. rust-version = "1.79.0"
  303. publish = false
  304. version = "0.6.3"
  305. [dependencies]
  306. reqwest = { workspace = true, features = ["json"], optional = true }
  307. ciborium = { workspace = true, optional = true }
  308. base64 = { workspace = true, optional = true }
  309. http-range = { version = "0.1.5", optional = true }
  310. wgpu = { version = "0.19", optional = true }
  311. ouroboros = { version = "*", optional = true }
  312. wasm-split = { workspace = true }
  313. [dev-dependencies]
  314. dioxus = { workspace = true, features = ["router"] }
  315. dioxus-ssr = { workspace = true }
  316. futures-util = "0.3.31"
  317. separator = "0.4.1"
  318. serde = { version = "1.0.136", features = ["derive"] }
  319. serde_json = "1.0.79"
  320. rand = { version = "0.8.4", features = ["small_rng"] }
  321. form_urlencoded = "1.2.0"
  322. async-std = "1.12.0"
  323. web-time = "1.1.0"
  324. [target.'cfg(target_arch = "wasm32")'.dev-dependencies]
  325. getrandom = { version = "0.2.12", features = ["js"] }
  326. tokio = { version = "1.40", default-features = false, features = [
  327. "sync",
  328. "macros",
  329. "io-util",
  330. "rt",
  331. "time"
  332. ] }
  333. [target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies]
  334. tokio = { version = "1.40", features = ["full"] }
  335. # force vendored openssl on android
  336. [target.'cfg(target_os = "android")'.dev-dependencies]
  337. openssl = { version = "0.10", features = ["vendored"] }
  338. # To make most examples faster to compile, we split out assets and http-related stuff
  339. # This trims off like 270 dependencies, leading to a significant speedup in compilation time
  340. [features]
  341. default = ["desktop"]
  342. desktop = ["dioxus/desktop"]
  343. liveview = ["dioxus/liveview"]
  344. fullstack = ["dioxus/fullstack"]
  345. server = ["dioxus/server"]
  346. mobile = ["dioxus/mobile"]
  347. web = ["dioxus/web"]
  348. http = ["dep:reqwest", "dep:http-range"]
  349. gpu = ["dep:ouroboros", "dep:wgpu"]
  350. [[example]]
  351. name = "login_form"
  352. required-features = ["http"]
  353. doc-scrape-examples = true
  354. [[example]]
  355. name = "dog_app"
  356. required-features = ["http"]
  357. doc-scrape-examples = true
  358. [[example]]
  359. name = "video_stream"
  360. required-features = ["http", "desktop"]
  361. doc-scrape-examples = true
  362. [[example]]
  363. name = "suspense"
  364. required-features = ["http", "desktop"]
  365. doc-scrape-examples = true
  366. [[example]]
  367. name = "weather_app"
  368. required-features = ["http"]
  369. doc-scrape-examples = true
  370. [[example]]
  371. name = "image_generator_openai"
  372. required-features = ["http"]
  373. doc-scrape-examples = true
  374. [[example]]
  375. name = "hash_fragment_state"
  376. required-features = ["ciborium", "base64"]
  377. doc-scrape-examples = true
  378. [[example]]
  379. name = "backgrounded_futures"
  380. required-features = ["desktop"]
  381. doc-scrape-examples = true
  382. [[example]]
  383. name = "calculator_mutable"
  384. required-features = ["desktop"]
  385. doc-scrape-examples = true
  386. [[example]]
  387. name = "calculator"
  388. required-features = ["desktop"]
  389. doc-scrape-examples = true
  390. [[example]]
  391. name = "clock"
  392. doc-scrape-examples = true
  393. [[example]]
  394. name = "crm"
  395. required-features = ["desktop"]
  396. doc-scrape-examples = true
  397. [[example]]
  398. name = "custom_html"
  399. required-features = ["desktop"]
  400. doc-scrape-examples = true
  401. [[example]]
  402. name = "custom_menu"
  403. required-features = ["desktop"]
  404. doc-scrape-examples = true
  405. [[example]]
  406. name = "dynamic_asset"
  407. required-features = ["desktop"]
  408. doc-scrape-examples = true
  409. [[example]]
  410. name = "errors"
  411. required-features = ["desktop"]
  412. doc-scrape-examples = true
  413. [[example]]
  414. name = "future"
  415. doc-scrape-examples = true
  416. [[example]]
  417. name = "hydration"
  418. required-features = ["desktop"]
  419. doc-scrape-examples = true
  420. [[example]]
  421. name = "multiwindow"
  422. required-features = ["desktop"]
  423. doc-scrape-examples = true
  424. [[example]]
  425. name = "overlay"
  426. required-features = ["desktop"]
  427. doc-scrape-examples = true
  428. [[example]]
  429. name = "popup"
  430. required-features = ["desktop"]
  431. doc-scrape-examples = true
  432. [[example]]
  433. name = "read_size"
  434. required-features = ["desktop"]
  435. doc-scrape-examples = true
  436. [[example]]
  437. name = "shortcut"
  438. required-features = ["desktop"]
  439. doc-scrape-examples = true
  440. [[example]]
  441. name = "streams"
  442. doc-scrape-examples = true
  443. [[example]]
  444. name = "visible"
  445. doc-scrape-examples = true
  446. [[example]]
  447. name = "window_event"
  448. required-features = ["desktop"]
  449. doc-scrape-examples = true
  450. [[example]]
  451. name = "window_focus"
  452. required-features = ["desktop"]
  453. doc-scrape-examples = true
  454. [[example]]
  455. name = "window_zoom"
  456. required-features = ["desktop"]
  457. doc-scrape-examples = true
  458. [[example]]
  459. name = "wgpu"
  460. required-features = ["desktop", "gpu"]
  461. [[example]]
  462. name = "control_focus"
  463. doc-scrape-examples = true
  464. [[example]]
  465. name = "eval"
  466. doc-scrape-examples = true
  467. [[example]]
  468. name = "logging"
  469. doc-scrape-examples = true