世祺 0423d5801c Initial commit (by Create-Cloudflare CLI) 1 год назад
..
src 0423d5801c Initial commit (by Create-Cloudflare CLI) 1 год назад
CHANGELOG.md 0423d5801c Initial commit (by Create-Cloudflare CLI) 1 год назад
README.md 0423d5801c Initial commit (by Create-Cloudflare CLI) 1 год назад
package.json 0423d5801c Initial commit (by Create-Cloudflare CLI) 1 год назад
tsconfig.json 0423d5801c Initial commit (by Create-Cloudflare CLI) 1 год назад

README.md

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';

export function loadMessage(buffer: ArrayBuffer): MyStruct {

  const message = capnp.Message.fromArrayBuffer(buffer);

  return message.getRoot(MyStruct);

}

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