tauri-plugin-macos-permissions
Check and request macOS system permissions from your Tauri v2 app
Repository Health
Technical Analysis
tauri-plugin-macos-permissions is a Tauri v2 plugin that lets desktop apps check and request the macOS system permissions they depend on, from Rust or from the front end. It wraps the native macOS authorization APIs behind a small set of check/request functions covering accessibility, full disk access, screen recording, microphone, camera, and input monitoring.
The plugin ships both a Rust crate and a companion JavaScript guest-bindings package, so you can drive permission flows from your Tauri backend or directly from TypeScript. On non-macOS targets the checks safely return true, keeping cross-platform builds simple.
What You Get
- A Tauri v2 plugin registered via
tauri_plugin_macos_permissions::init() - Check and request functions for accessibility, full disk access, screen recording, microphone, camera, and input monitoring
- A companion
tauri-plugin-macos-permissions-apiJavaScript/TypeScript bindings package - Safe no-op behavior on non-macOS platforms so cross-platform builds still compile and run
Common Use Cases
- Gating a screen-recording or screenshot feature behind the macOS screen recording permission
- Prompting for accessibility permission before a global hotkey or automation feature runs
- Requesting microphone and camera access before starting audio/video capture
Under The Hood
Architecture - The crate’s lib.rs builds a Tauri plugin named macos-permissions and registers twelve async commands through generate_handler!; each permission lives in its own module under src/commands/ (accessibility.rs, full_disk_access.rs, screen_recording.rs, microphone.rs, camera.rs, input_monitoring.rs) re-exported via commands/mod.rs. Every command is #[cfg(target_os = "macos")]-gated with a non-macOS branch that returns a permissive default, and a parallel guest-js/index.ts maps each command string to a typed JavaScript function.
Tech Stack - Written in Rust (edition 2021, rust-version 1.77.2) against tauri v2, with serde and thiserror for the shared layer. macOS-specific dependencies include macos-accessibility-client for accessibility, objc2 and objc2-foundation for Objective-C interop, plus direct FFI into CoreGraphics for screen recording. The JavaScript bindings package builds with Rollup and TypeScript and depends on @tauri-apps/api.
Code Quality - Each command carries doc comments with usage examples, and the per-permission module layout keeps concerns cleanly separated. Native calls go through objc2 message sends or extern "C" framework bindings guarded by unsafe. There is no automated test suite in the repository, which is a notable gap given the FFI surface, though the small, focused command bodies limit the blast radius.
API Design - The public surface is highly ergonomic: a single init() call registers the plugin, and every permission follows the same check_*/request_* naming in both Rust and JavaScript. The JS bindings mirror the Rust commands one-to-one, so front-end and back-end code stay symmetric, and the README documents the full method table plus the required Info.plist and capability wiring.
Used by 2 apps in this directory
Epicenter
Knowledge Management · Note Taking · Developer Tools
A local-first monorepo led by Whispering, an open-source speech-to-text app, built on an MIT toolkit that turns your data into plain Markdown and SQLite files you own instead of a database you rent.
Handy
Productivity
Free, offline, open-source speech-to-text that pastes directly into any app on Windows, macOS, and Linux.