feat(core): expose runtime_handle on AppHandle (#6727)

This commit is contained in:
Lucas Fernandes Nogueira
2023-04-17 09:49:09 -07:00
committed by GitHub
parent e6e586ad75
commit 276e4a3fdb
4 changed files with 16 additions and 1 deletions

View File

@@ -0,0 +1,5 @@
---
"tauri": patch
---
Added the `runtime_handle` method on `AppHandle`.

View File

@@ -0,0 +1,5 @@
---
"tauri": patch
---
Re-export the `tauri_runtime` crate as `tauri::runtime`.

View File

@@ -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.

View File

@@ -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")]