Expand description
§tauri-plugin-macos-fps
Unlock >60fps rendering on macOS for Tauri v2 apps.
WKWebView caps requestAnimationFrame at 60fps regardless of display refresh rate.
This plugin disables that cap by toggling WebKit’s internal
PreferPageRenderingUpdatesNear60FPSEnabled preference via the private _features API.
On non-macOS platforms, the plugin is a no-op.
§Quick start
ⓘ
fn main() {
tauri::Builder::default()
.plugin(tauri_plugin_macos_fps::init())
.run(tauri::generate_context!())
.expect("error while running tauri application");
}§Manual per-webview control
ⓘ
use tauri_plugin_macos_fps::MacFpsExt;
// Unlock native refresh rate for a specific webview:
webview.unlock_fps()?;
// Re-lock to 60fps:
webview.lock_fps()?;Structs§
- Config
- Plugin configuration. Set in
tauri.conf.jsonunderplugins.macos-fps:
Traits§
- MacFps
Ext - Extension trait for manual per-webview control of the frame rate cap.
Functions§
- init
- Initialize the plugin.