Description
TauRPC is a Tauri extension that provides a fully typed IPC layer between a Rust backend and a TypeScript frontend. You declare your backend API as Rust traits and procedures, and TauRPC generates TypeScript types for them when the app runs in debug mode, so the frontend calls backend commands through a typed proxy. The same typed approach covers Tauri events in both directions, so the backend can call the frontend as well. Specta is used under the hood to generate the types, and the trait-based API design was inspired by tarpc. To use it, you add the crates to Cargo.toml, implement your procedures with the taurpc procedures attribute, and export the bindings with the Exporter builder, usually wrapped in a debug-assertions check. On the frontend you install the taurpc package and import the proxy from the generated file. Structs used as inputs or outputs should be marked with the ipc_type attribute so their TypeScript types are generated. The README links to a complete example built with Svelte. TauRPC is an open-source project on GitHub.…
Highlights
- Typed commands and events between Rust and TypeScript
- TypeScript bindings generated at runtime in debug builds
- Trait-based procedure API
- Specta-based type generation
- Complete Svelte example
Ratings & Reviews
No ratings yet
Be the first to rate TauRPC.
People also visit
TauRPC FAQ
What is TauRPC?
A Tauri extension that gives you typed communication between the Rust backend and the TypeScript frontend for commands and events.
How are the TypeScript types made?
The bindings are generated when the app runs, using the Exporter builder, usually only in debug builds. Type generation uses Specta under the hood.
How do I use my structs?
Mark inputs and outputs with the ipc_type attribute so their TypeScript types are generated and serialized correctly.
Is there an example?
Yes. The README links to a complete example that uses Svelte.
What are the best TauRPC alternatives?
Popular alternatives to TauRPC include Tauri Specta, electron-trpc and RPC Anywhere. See all TauRPC alternatives






