Skip to content

Commit

Permalink
feat(core): expose runtime_handle on AppHandle (#6727)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasfernog committed Apr 17, 2023
1 parent e6e586a commit 276e4a3
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changes/app-runtime-handle.md
@@ -0,0 +1,5 @@
---
"tauri": patch
---

Added the `runtime_handle` method on `AppHandle`.
5 changes: 5 additions & 0 deletions .changes/expose-runtime.md
@@ -0,0 +1,5 @@
---
"tauri": patch
---

Re-export the `tauri_runtime` crate as `tauri::runtime`.
5 changes: 5 additions & 0 deletions core/tauri/src/app.rs
Expand Up @@ -277,6 +277,11 @@ impl<R: Runtime> AppHandle<R> {
pub(crate) fn create_proxy(&self) -> R::EventLoopProxy {
self.runtime_handle.create_proxy()
}

/// Returns the handle to the application runtime.
pub fn runtime_handle(&self) -> &R::Handle {
&self.runtime_handle
}
}

/// APIs specific to the wry runtime.
Expand Down
2 changes: 1 addition & 1 deletion core/tauri/src/lib.rs
Expand Up @@ -199,7 +199,7 @@ mod manager;
mod pattern;
pub mod plugin;
pub mod window;
use tauri_runtime as runtime;
pub use tauri_runtime as runtime;
#[cfg(target_os = "ios")]
mod ios;
#[cfg(target_os = "android")]
Expand Down

0 comments on commit 276e4a3

Please sign in to comment.