All Projects → timostamm → protobuf-ts

timostamm / protobuf-ts

Licence: Apache-2.0 license
Protobuf and RPC for TypeScript

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language
Makefile
30231 projects
C#
18002 projects
HTML
75241 projects
CSS
56736 projects

Projects that are alternatives of or similar to protobuf-ts

Go Micro Boilerplate
The boilerplate of the GoLang application with a clear microservices architecture.
Stars: ✭ 147 (-72.11%)
Mutual labels:  protobuf, protocol-buffers
Go Grpc Examples
This repo contains examples and implementations of different types of GRPC services and APIs using Golang.
Stars: ✭ 180 (-65.84%)
Mutual labels:  protobuf, protocol-buffers
Sbt Protobuf
sbt plugin for compiling protobuf files
Stars: ✭ 163 (-69.07%)
Mutual labels:  protobuf, protocol-buffers
Protobuf Java Format
Provide serialization and de-serialization of different formats based on Google’s protobuf Message. Enables overriding the default (byte array) output to text based formats such as XML, JSON and HTML.
Stars: ✭ 134 (-74.57%)
Mutual labels:  protobuf, protocol-buffers
elm-protobuf
protobuf plugin for elm
Stars: ✭ 93 (-82.35%)
Mutual labels:  protobuf, protocol-buffers
Pb And K
Kotlin Code Generator and Runtime for Protocol Buffers
Stars: ✭ 137 (-74%)
Mutual labels:  protobuf, protocol-buffers
Protoc Jar Maven Plugin
Protocol Buffers protobuf maven plugin - based on protoc-jar multi-platform executable protoc JAR
Stars: ✭ 177 (-66.41%)
Mutual labels:  protobuf, protocol-buffers
Twirp
PHP port of Twitch's Twirp RPC framework
Stars: ✭ 108 (-79.51%)
Mutual labels:  protobuf, protocol-buffers
Protoc Gen Lint
A plug-in for Google's Protocol Buffers (protobufs) compiler to lint .proto files for style violations.
Stars: ✭ 221 (-58.06%)
Mutual labels:  protobuf, protocol-buffers
Rules protobuf
Bazel rules for building protocol buffers and gRPC services (java, c++, go, ...)
Stars: ✭ 206 (-60.91%)
Mutual labels:  protobuf, protocol-buffers
pronto
Clojure support for protocol buffers
Stars: ✭ 66 (-87.48%)
Mutual labels:  protobuf, protocol-buffers
rules proto grpc
Bazel rules for building Protobuf and gRPC code and libraries from proto_library targets
Stars: ✭ 201 (-61.86%)
Mutual labels:  protobuf, protocol-buffers
Protoeasy Go
Simpler usage of protoc. Deprecated.
Stars: ✭ 129 (-75.52%)
Mutual labels:  protobuf, protocol-buffers
Protolint
A pluggable linter and fixer to enforce Protocol Buffer style and conventions.
Stars: ✭ 142 (-73.06%)
Mutual labels:  protobuf, protocol-buffers
Protobuf.jl
Julia protobuf implementation
Stars: ✭ 127 (-75.9%)
Mutual labels:  protobuf, protocol-buffers
Protofuzz
Google Protocol Buffers message generator
Stars: ✭ 171 (-67.55%)
Mutual labels:  protobuf, protocol-buffers
Protobuf
Protocol Buffers - Google's data interchange format
Stars: ✭ 52,305 (+9825.05%)
Mutual labels:  protobuf, protocol-buffers
Protodot
transforming your .proto files into .dot files (and .svg, .png if you happen to have graphviz installed)
Stars: ✭ 107 (-79.7%)
Mutual labels:  protobuf, protocol-buffers
Protobuf Dynamic
Protocol Buffers Dynamic Schema - create protobuf schemas programmatically
Stars: ✭ 186 (-64.71%)
Mutual labels:  protobuf, protocol-buffers
Protoman
Postman for protobuf APIs
Stars: ✭ 241 (-54.27%)
Mutual labels:  protobuf, protocol-buffers

protobuf-ts <timostamm> npm

Protocol buffers and RPC for Node.js and the Web Browser. Pure TypeScript.

For the following .proto file:

syntax = "proto3";

message Person {
    string name = 1;
    uint64 id = 2;
    int32 years = 3;
    optional bytes data = 5;
}

protobuf-ts generates code that can be used like this:

let pete: Person = {
    name: "pete", 
    id: 123n, // it's a bigint
    years: 30
    // data: new Uint8Array([0xDE, 0xAD, 0xBE, 0xEF]);
};

let bytes = Person.toBinary(pete);
pete = Person.fromBinary(bytes);

pete = Person.fromJsonString('{"name":"pete", "id":"123", "years": 30}')

What are protocol buffers?

Protocol buffers is an interface definition language and binary serialization format.
Data structures defined in .proto files are platform-independent and can be used in many languages.
To learn more about the capabilities, please check the official language guide.

Quickstart

  • npm install @protobuf-ts/plugin

    installs the plugin and the compiler "protoc"

  • download the example file msg-readme.proto and place it into a protos/ directory

  • npx protoc --ts_out . --proto_path protos protos/msg-readme.proto

    generates msg-readme.ts
    if your protoc version asks for it, add the flag "--experimental_allow_proto3_optional"

Features

Read the MANUAL to learn more.

Copyright

Support

Buy Me A Coffee

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].