Skip to content

codehz/deno-pbf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Deno port of pbf

Original project: https://github.com/mapbox/pbf

Changes:

  1. add typescript definition for runtime
  2. rewrite the compiler to get typescript output

Usage

CLI:

deno install --allow-read --allow-write --name pbf https://deno.land/x/pbf/cli.ts
pbf a.proto -o a.generated.ts

API:

import { SomeMessage } from "./a.generated.ts";
import { Pbf } from "https://deno.land/x/pbf/mod.ts";

const pbf = new Pbf();
const data = SomeMessage.write({ key: "value" }, pbf);