Description
electron-trpc is a library for building type-safe inter-process communication (IPC) in Electron apps with tRPC. You expose APIs from Electron's main process to one or more renderer processes, and the client types are inferred from those APIs, so the renderer code is checked against the main process. The project says Electron IPC is faster and more secure than opening a local server for communication, which is a common alternative. It supports all tRPC features, including queries, mutations and subscriptions, so you do not have to write complicated two-way IPC schemes by hand. The documentation has a Getting Started guide, an example usage page, and separate sections for the main process and the renderer. An example project is included in the repository's examples folder. The site describes the library as an ergonomic and type-safe solution for building IPC in Electron.…
Highlights
- Type-safe IPC between Electron processes
- Client types inferred from the main process
- Queries, mutations and subscriptions
- Faster and more secure than a local server
- Example project in the repository
Ratings & Reviews
No ratings yet
Be the first to rate electron-trpc.
People also visit
electron-trpc FAQ
What is electron-trpc?
A library for type-safe IPC in Electron, built on tRPC.
Why not use a localhost server?
The docs say Electron IPC is faster and more secure than opening local servers for communication.
Which tRPC features work?
The project says all of them, including queries, mutations and subscriptions.
Do I write the client types myself?
No. The client types are inferred from the APIs exposed in the main process.
Where do I start?
The Getting Started page, then the example usage section and the example project in the repository.
What are the best electron-trpc alternatives?
Popular alternatives to electron-trpc include Electron Toolkit, TauRPC and Electron Redux. See all electron-trpc alternatives


