# @univerjs/rpc

> Browser RPC layer for Univer main-thread and worker communication.

Latest version **1.0.2** (published 2026-09-24) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install @univerjs/rpc
pnpm add @univerjs/rpc
yarn add @univerjs/rpc
bun add @univerjs/rpc
```

## Health

**Score 80/100 (A)** — status: active.

Positive: has types; esm support; no vulnerabilities; has provenance; recently updated; high maintenance score; high quality score; popular repo.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2026-09-24 |
| First published | 2023-12-05 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 127.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 14375 |
| Author | DreamNum Co., Ltd. <developer@univer.ai> |
| Maintainers | jikkai, wbfsa, mengshukeji |
| Keywords | univer, rpc, worker, message-channel, plugin |

## Links

- npm: https://www.npmjs.com/package/@univerjs/rpc
- Repository: https://github.com/dream-num/univer
- Homepage: https://univer.ai
- Issues: https://github.com/dream-num/univer/issues
- Funding: https://opencollective.com/univer
- npm.io page: https://npm.io/package/@univerjs/rpc

## Dependencies (1)

- [@univerjs/core](https://npm.io/package/@univerjs/core.md) 1.0.2

## Alternatives

- [cron](https://npm.io/package/cron.md) — 4.9M weekly downloads
- [@vercel/queue](https://npm.io/package/@vercel/queue.md) — 731.6K weekly downloads
- [create-sonicjs](https://npm.io/package/create-sonicjs.md) — 1.6K weekly downloads
- [@exellix/jobs-api](https://npm.io/package/@exellix/jobs-api.md) — 941 weekly downloads
- [@forwardimpact/libskill](https://npm.io/package/@forwardimpact/libskill.md) — 575 weekly downloads

## Recent versions

- 1.0.2 (latest) — 2026-09-24
- 1.0.0-rc.0 (rc) — 2026-09-10
- 1.0.0-beta.2 (beta) — 2026-08-22
- 1.0.0-insiders.20260813-7c9aa50 (insiders) — 2026-08-13
- 1.0.0-alpha.8 (alpha) — 2026-07-29
- 0.12.4-experimental.20251211-e01e32a (experimental) — 2025-12-11
- 0.12.3-nightly.202512060617 (nightly) — 2025-12-06
- 1.0.1 — 2026-09-24
- 1.0.0 — 2026-09-23
- 0.25.2 — 2026-09-17
- 1.0.0-beta.1 — 2026-08-15
- 1.0.0-insiders.20260809-70eefdd — 2026-08-09
- 1.0.0-insiders.20260808-70eefdd — 2026-08-08
- 1.0.0-beta.0 — 2026-08-05
- 1.0.0-insiders.20260805-b15e7f3 — 2026-08-05
- … 717 more at https://npm.io/package/@univerjs/rpc/versions

## README

# @univerjs/rpc

[![npm version](https://img.shields.io/npm/v/@univerjs/rpc?style=flat-square)](https://npmjs.com/package/@univerjs/rpc)
[![license](https://img.shields.io/npm/l/@univerjs/rpc?style=flat-square)](https://npmjs.com/package/@univerjs/rpc)
[![downloads](https://img.shields.io/npm/dm/@univerjs/rpc?style=flat-square)](https://npmjs.com/package/@univerjs/rpc)

`@univerjs/rpc` provides a browser-friendly RPC layer for communicating between the main thread and workers or other message-based runtimes.

## Package Overview

| Package | UMD global | CSS | Locales | Facade entry |
| --- | --- | :---: | :---: | :---: |
| `@univerjs/rpc` | `UniverRpc` | No | No | No |

## Installation

```sh
pnpm add @univerjs/rpc
# or
npm install @univerjs/rpc
```

Keep all `@univerjs/*` packages on the same version.

## Usage

```ts
import { UniverRPCMainThreadPlugin } from '@univerjs/rpc';

const worker = new Worker(new URL('./worker.js', import.meta.url), { type: 'module' });
univer.registerPlugin(UniverRPCMainThreadPlugin, { workerURL: worker });
univer.onDispose(() => worker.terminate());
```

The referenced worker module must create its own Univer instance and register `UniverRPCWorkerThreadPlugin`; see the [browser worker example](../../examples/src/sheets-mobile/worker.ts).

Exported plugin classes:

- `UniverRPCMainThreadPlugin`
- `UniverRPCWorkerThreadPlugin`

## Resources

- [Documentation](https://docs.univer.ai)
- [NPM package](https://npmjs.com/package/@univerjs/rpc)
- [GitHub repository](https://github.com/dream-num/univer)

---
_Source: https://npm.io/package/@univerjs/rpc · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
