Skip to content

Commit

Permalink
chore: Remove Dioxus hot-reload support
Browse files Browse the repository at this point in the history
  • Loading branch information
marc2332 committed Jan 12, 2025
1 parent d96f0b4 commit 53eb62e
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 77 deletions.
4 changes: 1 addition & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ docs = ["freya/docs"]
# dioxus-hooks = { git = "https://github.com/DioxusLabs/dioxus", rev = "7beacdf9c76ae5412d3c2bcd55f7c5d87f486a0f" }
# dioxus-signals = { git = "https://github.com/DioxusLabs/dioxus", rev = "7beacdf9c76ae5412d3c2bcd55f7c5d87f486a0f" }
# dioxus-core = { git = "https://github.com/DioxusLabs/dioxus", rev = "7beacdf9c76ae5412d3c2bcd55f7c5d87f486a0f" }
# dioxus-hot-reload = { git = "https://github.com/DioxusLabs/dioxus", rev = "7beacdf9c76ae5412d3c2bcd55f7c5d87f486a0f" }
# dioxus-router = { git = "https://github.com/DioxusLabs/dioxus", rev = "7beacdf9c76ae5412d3c2bcd55f7c5d87f486a0f" }

[workspace.dependencies]
Expand All @@ -46,12 +45,11 @@ freya-native-core-macro = { path = "crates/native-core-macro", version = "0.3.0-
freya-native-core = { path = "crates/native-core", version = "0.3.0-rc.0" }

dioxus = { version = "0.5", default-features = false, features = ["macro", "signals", "hooks"]}
dioxus-rsx = { version = "0.5", features = ["hot_reload"] }
dioxus-rsx = { version = "0.5" }
dioxus-core-macro = { version = "0.5" }
dioxus-hooks = { version = "0.5" }
dioxus-signals = { version = "0.5" }
dioxus-core = { version = "0.5" }
dioxus-hot-reload = { version = "0.5", features = ["file_watcher"], default-features = false }
dioxus-router = { version = "0.5", default-features = false }
dioxus-clipboard = "0.1"
dioxus-i18n = "0.3"
Expand Down
1 change: 0 additions & 1 deletion crates/freya/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ dioxus = { workspace = true }
dioxus-core-macro = { workspace = true }
dioxus-hooks = { workspace = true }
dioxus-core = { workspace = true }
dioxus-hot-reload = { workspace = true }
dioxus-signals = { workspace = true }

tokio = { workspace = true }
Expand Down
5 changes: 0 additions & 5 deletions crates/freya/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,6 @@ pub mod prelude {
};
pub use dioxus_core_macro::*;
pub use dioxus_hooks::*;
pub use dioxus_hot_reload::{
self,
hot_reload_init,
Config,
};
pub use dioxus_signals::*;
pub use freya_components::*;
pub use freya_core::prelude::PreferredTheme;
Expand Down
1 change: 0 additions & 1 deletion crates/renderer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ torin = { workspace = true }

freya-native-core = { workspace = true }
dioxus-core = { workspace = true }
dioxus-hot-reload = { workspace = true }

tokio = { workspace = true }
gl = { workspace = true }
Expand Down
14 changes: 0 additions & 14 deletions crates/renderer/src/renderer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,20 +86,6 @@ impl<'a, State: Clone + 'static> DesktopRenderer<'a, State> {
.expect("Failed to create event loop.");
let proxy = event_loop.create_proxy();

// Hotreload support for Dioxus
#[cfg(feature = "hot-reload")]
{
use std::process::exit;
let proxy = proxy.clone();
dioxus_hot_reload::connect(move |msg| match msg {
dioxus_hot_reload::HotReloadMsg::UpdateTemplate(template) => {
let _ = proxy.send_event(EventMessage::UpdateTemplate(template));
}
dioxus_hot_reload::HotReloadMsg::Shutdown => exit(0),
dioxus_hot_reload::HotReloadMsg::UpdateAsset(_) => {}
});
}

let mut desktop_renderer =
DesktopRenderer::new(vdom, sdom, config, devtools, hovered_node, proxy);

Expand Down
53 changes: 0 additions & 53 deletions examples/hotreload.rs

This file was deleted.

0 comments on commit 53eb62e

Please sign in to comment.