浏览代码

Use dioxus-native-dom crate

Signed-off-by: Nico Burns <nico@nicoburns.com>
Nico Burns 5 天之前
父节点
当前提交
ea8eac75d7
共有 3 个文件被更改,包括 6 次插入6 次删除
  1. 1 1
      Cargo.lock
  2. 3 3
      examples/native-headless/Cargo.toml
  3. 2 2
      examples/native-headless/src/main.rs

+ 1 - 1
Cargo.lock

@@ -10638,7 +10638,7 @@ dependencies = [
  "blitz-traits",
  "bytemuck",
  "dioxus",
- "dioxus-native",
+ "dioxus-native-dom",
  "futures-util",
  "pollster",
  "rustc-hash 1.1.0",

+ 3 - 3
examples/native-headless/Cargo.toml

@@ -9,10 +9,11 @@ license = "MIT"
 publish = false
 
 [features]
-tracing = ["dep:tracing-subscriber", "dioxus-native/tracing"]
+tracing = ["dep:tracing-subscriber", "dioxus-native-dom/tracing"]
 
 [dependencies]
-dioxus-native = { path = "../../packages/native" }
+dioxus = { workspace = true, default-features = false, features = ["html", "hooks", "signals"] }
+dioxus-native-dom = { path = "../../packages/native-dom" }
 anyrender_vello = "0.4.1"
 vello = "0.5"
 rustc-hash = "1.1.0"
@@ -20,7 +21,6 @@ blitz-paint = "0.1.0-alpha.5"
 blitz-traits = "0.1.0-alpha.5"
 blitz-dom = "0.1.0-alpha.5"
 futures-util = "0.3.30"
-dioxus = { workspace = true }
 tracing-subscriber = { workspace = true, optional = true }
 wgpu = "24"
 pollster = "0.4"

+ 2 - 2
examples/native-headless/src/main.rs

@@ -3,7 +3,7 @@
 //!
 //! (this example is not really intended to be run as-is, and requires you to fill
 //! in the missing pieces)
-use anyrender_vello::{wgpu_context::WGPUContext, VelloScenePainter};
+use anyrender_vello::{wgpu_context::WGPUContext, CustomPaintSource, VelloScenePainter};
 use blitz_dom::Document as _;
 use blitz_paint::paint_scene;
 use blitz_traits::{
@@ -11,7 +11,7 @@ use blitz_traits::{
     shell::{ColorScheme, Viewport},
 };
 use dioxus::prelude::*;
-use dioxus_native::{CustomPaintSource, DioxusDocument};
+use dioxus_native_dom::DioxusDocument;
 use pollster::FutureExt as _;
 use rustc_hash::FxHashMap;
 use std::sync::Arc;