tauri-plugin-sentry

Sentry error and crash reporting for Tauri v2 apps, unifying Rust backend and browser frontend telemetry.

Library
Cargo
v0.6.0
234stars
MIT OR Apache-2.0

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
48/100Fair
Development Activity52
Maintenance8
Community56
Maturity56
Momentum20

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
76/100Good
Architecture78
Code Quality70
Innovation75
Learning Curve80

tauri-plugin-sentry is a Tauri v2 plugin that wires Sentry error monitoring into both halves of a Tauri application. Instead of running the Sentry Rust and browser SDKs in isolation, it routes browser breadcrumbs and events through the Rust backend so every report is enriched with consistent Rust, OS, and device context.

The plugin injects a pre-minified build of @sentry/browser into each web view, merges breadcrumbs across the Rust and JavaScript sides, and can capture native minidumps from a separate crash-reporter process. The result is a single, correlated view of what was happening in both the backend and the frontend when an error occurred.

What You Get

  • A single Tauri plugin that initializes Sentry across the Rust backend and every web view
  • Automatic injection of a pre-minified @sentry/browser build with a custom transport
  • Merged breadcrumbs and enriched context shared between the Rust and JavaScript SDKs
  • Optional native minidump capture through sentry-rust-minidump for backend crashes
  • An opt-out injection mode for teams that want to configure @sentry/browser themselves

Common Use Cases

  • Monitoring production crashes in a cross-platform Tauri desktop app
  • Correlating frontend JavaScript errors with backend Rust panics in one Sentry event
  • Capturing native minidumps for hard crashes that a normal SDK cannot report
  • Adding device and OS context to browser error reports without extra wiring

Under The Hood

Architecture - The plugin is built on Tauri v2’s plugin Builder in src/lib.rs, registering an invoke_handler for two commands (breadcrumb, envelope) defined in src/commands.rs and managing a cloned sentry::Client in Tauri app state. When JavaScript injection is enabled it registers a js_init_script from a pre-minified dist/inject.min.js, substituting a debug flag at runtime; the browser SDK’s custom transport forwards events and breadcrumbs to the Rust side via Tauri’s invoke API, where serde deserializes them into existing Sentry Rust types.

Tech Stack - Written in Rust (edition 2021) against tauri 2, the sentry 0.42 crate, serde, base64, thiserror, and schemars, with an optional sentry-rust-minidump 0.13 dependency gated behind a minidump feature for non-iOS targets. A companion TypeScript package under js/ (bundled with Rollup and linted with Biome) provides the browser-side glue.

Code Quality - The Rust surface is small and focused, using idiomatic feature gates (cfg(not(target_os = "ios"))), builder patterns, and thiserror for errors. The repository ships example apps rather than a formal unit-test suite, so correctness leans on the example app and integration with the upstream Sentry SDKs.

API Design - The public API is deliberately minimal: init(&client), init_with_options, and init_with_no_injection cover the common cases, and sentry-rust-minidump is re-exported so consumers do not add it separately. Getting started is a few lines of Cargo config plus a single .plugin(...) call, making the developer experience low-friction for existing Sentry users.

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers

Search