Zero Configuration
Works out of the box with Web Workers, WebSockets, Node.js child processes and more. No complex setup required.
Transparent RPC communication for JavaScript with full TypeScript support
// Provider side - expose your API
import { provide } from '@remobj/core'
const api = {
greet: (name: string) => `Hello, ${name}!`,
calculate: async (a: number, b: number) => {
// Complex calculations can run in a worker
return a + b
}
}
provide(api, endpoint)
// Consumer side - use the remote API
import { consume } from '@remobj/core'
const remote = consume<typeof api>(endpoint)
// Call remote functions with full type safety
const greeting = await remote.greet('World')
const result = await remote.calculate(5, 3)
Traditional RPC libraries often require complex setup, protocol definitions, or lose type safety across boundaries. RemObj changes this by providing:
provide()
and consume()
Offload CPU-intensive tasks without blocking the main thread
Build distributed systems with type-safe communication
Secure IPC between main and renderer processes
Communication between content scripts and background workers
Just want to try it out? Skip to the Quickstart.