prost
tonic
prost | tonic | |
---|---|---|
14 | 48 | |
3,513 | 8,966 | |
2.0% | 1.4% | |
8.3 | 8.6 | |
8 days ago | 7 days ago | |
Rust | Rust | |
Apache License 2.0 | MIT License |
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.
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?
tonic
-
Roll your own auth with Rust and Protobuf
Use tonic-build directly from Rust.
-
How to limit different concurrency number by service on Tonic?
} // Omit the remaining code and refer to the example in Tonic: https://github.com/hyperium/tonic/blob/master/examples/src/multiplex/server.rs ```
-
Ideas/Suggestions around setting up a data pipeline from scratch
If I’m not misunderstanding, you could both decode the gRPC protobuf AND write to delta lake in Rust. Tonic, Delta-rs.
-
Throughput doesn't increase with cores/threads count
Original post: https://github.com/hyperium/tonic/issues/1405. Cross-post here in case the problem is not specific to tonic.
-
Getting started with gRPC in Rust
Tonic
-
libp2p alternate
Just to double check Is this the correct repo?
-
Spaceman: A gRPC client from another world. Comes both as a CLI and as a GUI built with Tauri and Yew.rs
Wasm isn't involved much actually. Basically, the frontend asks the backend to perform a gRPC call on its behalf using Tauri events. They are like named channels on which you can send any serde-compatible value. But the backend is a normal Rust program so there are no constraints there. I use prost-reflect to encode/decode Protobuf messages according to Protobuf descriptors loaded at runtime and make the actual requests using tonic from the tokio ecosystem. prost-reflect is necessary because, normally, tonic expects the Protobuf descriptor to be known at compile time so it can make some code generation behind the scenes.
-
Is there something like Feathersjs for Rust?
You could have a look at gRPC i.e. https://github.com/hyperium/tonic
-
Tower - middleware or interceptor
Looking at this example code: https://github.com/hyperium/tonic/blob/master/examples/src/tower/server.rs
-
Keyword Generics Progress Report: February 2023 | Inside Rust Blog
The remaining gap is remote actors, since you still need some kind of serialization between them, and take your pick of standards for that one such as gRPC using Tonic.
What are some alternatives?
rust-protobuf - Rust implementation of Google protocol buffers
actix-web - Actix Web is a powerful, pragmatic, and extremely fast web framework for Rust.
cargo-raze - Generate Bazel BUILD from Cargo dependencies!
grpc-rust - Rust implementation of gRPC
varint-simd - Decoding and encoding gigabytes of LEB128 variable-length integers per second in Rust with SIMD
tarpc - An RPC framework for Rust with a focus on ease of use.
ts-proto - An idiomatic protobuf generator for TypeScript
axum - Ergonomic and modular web framework built with Tokio, Tower, and Hyper
prost - PROST! a Protocol Buffers implementation for the Rust Language
rust-prometheus - Prometheus instrumentation library for Rust applications
bytes - Utilities for working with bytes
tokio - A runtime for writing reliable asynchronous applications with Rust. Provides I/O, networking, scheduling, timers, ...