npm.io
0.9.3 • Published 2 months ago

capnp-ts

Licence
MIT
Version
0.9.3
Deps
2
Size
1.0 MB
Vulns
0
Weekly
0
Stars
167

capnp-ts

A strongly typed Cap'n Proto implementation for the browser and Node.js using TypeScript.

Here's a quick usage example:

import * as capnp from 'capnp-ts';

import {MyStruct} from './myschema.capnp.js';

export function loadMessage(buffer: ArrayBuffer): MyStruct {

  const message = new capnp.Message(buffer, false);

  return message.getRoot(MyStruct);

}

An extended readme is available on the project site: https://github.com/jdiaz5513/capnp-ts.

Keywords