diff --git a/crates/tauri-runtime-cef/src/lib.rs b/crates/tauri-runtime-cef/src/lib.rs index 0ab1eee10..37d80d179 100644 --- a/crates/tauri-runtime-cef/src/lib.rs +++ b/crates/tauri-runtime-cef/src/lib.rs @@ -51,6 +51,16 @@ mod cef_impl; mod cef_webview; mod utils; +pub fn webview_version() -> Result { + Ok(format!( + "{}.{}.{}.{}", + cef_dll_sys::CHROME_VERSION_MAJOR, + cef_dll_sys::CHROME_VERSION_MINOR, + cef_dll_sys::CHROME_VERSION_PATCH, + cef_dll_sys::CHROME_VERSION_BUILD + )) +} + #[macro_export] macro_rules! getter { ($self: ident, $rx: expr, $message: expr) => {{ diff --git a/crates/tauri/src/lib.rs b/crates/tauri/src/lib.rs index b92f4c7bd..afee655ad 100644 --- a/crates/tauri/src/lib.rs +++ b/crates/tauri/src/lib.rs @@ -227,6 +227,10 @@ use utils::assets::{AssetKey, CspHash, EmbeddedAssets}; #[cfg_attr(docsrs, doc(cfg(feature = "wry")))] pub use tauri_runtime_wry::webview_version; +#[cfg(feature = "cef")] +#[cfg_attr(docsrs, doc(cfg(feature = "cef")))] +pub use tauri_runtime_cef::webview_version; + #[cfg(target_os = "macos")] #[cfg_attr(docsrs, doc(cfg(target_os = "macos")))] pub use runtime::ActivationPolicy;