ts-proto
prost
Our great sponsors
ts-proto | prost | |
---|---|---|
8 | 14 | |
1,925 | 3,513 | |
- | 4.6% | |
9.0 | 8.3 | |
8 days ago | 5 days ago | |
TypeScript | Rust | |
Apache License 2.0 | Apache License 2.0 |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
ts-proto
-
Deno-first implementation of protobuf Reader and Writer
I created it so that I could use `protoc` and `ts-proto` to convert the otel proto files into typescript files.
-
Is TypeScript actually worth It?
Re libraries incompatible with certain typescript versions - e.g. protobufjs fix - it’s been my experience that you want to try and only use compilers specific to each library and compile libraries separately. It’s unfortunate but the JS community often tries to run all JS for a project through the same single compiler tool chain, using one global version of the compiler instead of relying on and effectively linking the JS output for each library. Unless you routinely rewrite third-party libraries to match your toolchain’s expectations, you’re going to have a hard time doing that.
For a library that generates code, that’s a special case, as the code it generates must target a particular language version. You have three choices: 1. Upstream a fix as you propose; 2. Side-by-side install both TS 4.6 and TS 4.7 using workspaces or sub-projects and have some of your code compile with 4.6 and then link the results or 3. Find a replacement that is updated to 4.7. For example, https://github.com/stephenh/ts-proto has 4.7 support listed in its readme.
- Protobuf-ES: The Protocol Buffers TypeScript/JavaScript runtime we all deserve
-
[help] Tonic-build: how to generate generic service definition?
With ts-proto, I can pass a --ts_proto_opt=outputServices=generic-definitions as a flag to protoc to generate "generic service definitions". These definitions contain descriptors for each method, which allows to generate server and client stubs at runtime, and also generate strong types for them at compile time.
-
Connect: A Better gRPC
Curious to see their typescript implementation and how it compares with https://github.com/stephenh/ts-proto which works great for grpc-web.
-
Why isn't gRPC used more for browser to api transport over REST / graphql?
I'm planning on modding https://github.com/stephenh/ts-proto to use https://github.com/ianstormtaylor/superstruct on the client.
-
React Native + gRPC 2021
We also use protobufs and typescript, so we use ts-proto for codegen + binding to grpc services.
-
Typescript clients for invoking Protobuf services over HTTP
Fwiw I maintain ts-proto (https://github.com/stephenh/ts-proto/) and it'd be cool to have the functionality you're building supported in ts-proto at somepoint, if you're curious/want to poke around/etc. :-) Right now there is grpc support via the improbable-eng grpcwebproxy, but supporting GCP's transcoding as well would be great.
prost
-
Fivefold Slower Compared to Go? Optimizing Rust's Protobuf Decoding Performance
The benchmark is not comparing apples to apples.
prost is the most widely used Protobuf implementation in Rust, maintained by the Tokio organization. prost generates structs and serialization/deserialization code for you.
easyproto according to GitHib Search is used only by two projects. easyproto provides primitives for serializing and deserializing Protobuf, and requires hand writing code to do both.
A fair comparison would be prost vs google.golang.org/protobuf, or easyproto vs parts of quick-protobuf.
In most cases you can make Go as fast as Rust, but from my experience writing performance-sensitive code in Go requires significantly larger time investment and overall requires deeper language expertise. Pebble (RocksDB replacement in Go by CockroachDB) is a good example of this, the codebase is littered with hand-inlined[1] functions, hand-unrolled loops and it's not[2] even using Go memory management for performance critical parts, it's using the C memory allocator and manual memory management.
[prost]: https://github.com/tokio-rs/prost
- How Turborepo is porting from Go to Rust
-
Hey Rustaceans! Got a question? Ask here! (49/2022)!
You could use Protocol buffers to define a message type, then use prost to generate encoding/decoding code for that type.
- Adding #derive to a struct defined in another place
-
grpc gateway
Thanks but that doesn't seems to support `json_mapping` , there is a draft available but not sure when it will get merged https://github.com/tokio-rs/prost/pull/558
-
[help] Tonic-build: how to generate generic service definition?
Hi r/rust, I have a question regarding tonic-build (or prost-build).
-
Unwrapping inner values from the enum more easily?
Currently, I'm making some stuff by using protobuf via prost. Maybe you know, protobuf v3 treats all fields as optional, so it is pain to unwrap every nested field.
- Best way to communicate between Rust and Go?
-
Past, present and future of rust-protobuf
Note: one additional key feature currently missing from Prost is Proto2 extensions.
- Does prost [protocol buffers for rust] use tokio runtime to implement GRPC service?
What are some alternatives?
protobuf-ts - Protobuf and RPC for TypeScript
rust-protobuf - Rust implementation of Google protocol buffers
protoc-gen-typescript-http - Generate types and service clients from protobuf definitions annotated with http rules.
tonic - A native gRPC client & server implementation with async/await support.
protobuf-es - Protocol Buffers for ECMAScript. The only JavaScript Protobuf library that is fully-compliant with Protobuf conformance tests.
cargo-raze - Generate Bazel BUILD from Cargo dependencies!
grpc-web - gRPC for Web Clients
varint-simd - Decoding and encoding gigabytes of LEB128 variable-length integers per second in Rust with SIMD
deno-pbf - Deno pbf port of https://github.com/mapbox/pbf
prost - PROST! a Protocol Buffers implementation for the Rust Language
grpc-web - gRPC Web implementation for Golang and TypeScript
bytes - Utilities for working with bytes