Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions packages/native/src/assets.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,12 @@ impl NetProvider<Resource> for DioxusNativeNetProvider {
if request.url.scheme() == "dioxus" {
match dioxus_asset_resolver::native::serve_asset(request.url.path()) {
Ok(res) => {
#[cfg(feature = "tracing")]
tracing::trace!("fetching asset from file system success {request:#?}");
handler.bytes(doc_id, res.into_body().into(), self.callback.clone())
}
Err(_) => {
#[cfg(feature = "tracing")]
tracing::warn!("fetching asset from file system error {request:#?}");
}
}
Expand Down
1 change: 1 addition & 0 deletions packages/native/src/dioxus_application.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ impl DioxusNativeApplication {

impl ApplicationHandler<BlitzShellEvent> for DioxusNativeApplication {
fn resumed(&mut self, event_loop: &ActiveEventLoop) {
#[cfg(feature = "tracing")]
tracing::debug!("Injecting document provider into all windows");

if let Some(config) = self.pending_window.take() {
Expand Down
2 changes: 2 additions & 0 deletions packages/native/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,12 @@ pub fn launch_cfg_with_props<P: Clone + 'static, M: 'static>(
let event_loop = create_default_event_loop::<BlitzShellEvent>();

// Turn on the runtime and enter it
#[cfg(feature = "net")]
let rt = tokio::runtime::Builder::new_multi_thread()
.enable_all()
.build()
.unwrap();
#[cfg(feature = "net")]
let _guard = rt.enter();

// Setup hot-reloading if enabled.
Expand Down
Loading