Skip to content

vgi-rpc-typescript

TypeScript RPC powered by Apache Arrow. Define typed methods. Serve over stdio or HTTP. No code generation, no schema files.
Arrow-native end to end. Data stays in columnar format from handler to wire. No JSON serialization, no encoding overhead.
Two transports, one definition. The same Protocol serves subprocess stdin/stdout and HTTP. Switch with one line.
Runtime introspection built in. Any vgi-rpc client discovers your methods, their schemas, and their docs automatically.

A complete RPC server in 8 lines

const protocol = new Protocol("Calculator");

protocol.unary("add", {
  params: { a: float, b: float },
  result: { result: float },
  handler: async ({ a, b }) => ({ result: a + b }),
});

new VgiRpcServer(protocol).run();
$ vgi-rpc call add a=2 b=3
{result: 5.0}

Last updated: