Cargo.toml 16 KB

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