rust-errors
OfficialRust-to-TypeScript error handling for Tauri apps.
Software Engineering#typescript#rust#error-handling#interoperability#tauri#discriminated-unions#serde
AuthorEpicenterHQ
Version1.0.0
Installs0
System Documentation
What problem does it solve?
Passing errors from Rust to TypeScript in Tauri apps is error-prone due to mismatched shapes and lack of a stable error contract. This Skill provides a pattern using internally tagged enums (discriminated unions) to ensure a consistent error structure across the Rust–TypeScript boundary.
Core Features & Use Cases
- Discriminated-union pattern for Rust-to-TypeScript errors using serde tagging (name field) to enable reliable error matching in TS.
- Clear Rust error definitions with messages and structured data, and corresponding TypeScript validation patterns.
- Guidance on serialization formats and best practices to maintain consistency across the boundary.
- Use Case: When a Tauri command fails, the frontend can discriminate the error by name and display user-friendly messages.
Quick Start
Define your Rust errors with serde tagging to create a name discriminator and handle them in TypeScript using a discriminated-union pattern.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: rust-errors Download link: https://github.com/EpicenterHQ/epicenter/archive/main.zip#rust-errors Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.