Rust implementation #7
Replies: 12 comments 17 replies
-
|
Not a rust expert, just want to share some thoughts. |
Beta Was this translation helpful? Give feedback.
-
|
Do you kind people know https://github.com/AThilenius/axum-connect? |
Beta Was this translation helpful? Give feedback.
-
|
I saw the news about Buf Rust SDK, is Rust backend coming? |
Beta Was this translation helpful? Give feedback.
-
|
Additionally, axum-connect hasn't received a single update in 7 months so it doesn't seem like a viable solution. |
Beta Was this translation helpful? Give feedback.
-
|
There is another implementation https://github.com/lann/connect-rpc-rs |
Beta Was this translation helpful? Give feedback.
-
|
Hey @akshayjshah I wonder if you could share some update about the discussion. |
Beta Was this translation helpful? Give feedback.
-
|
@akshayjshah What are your thoughts on this grpc-io official move to support rust? |
Beta Was this translation helpful? Give feedback.
-
|
Any news about grpc-rust? Something we can try? |
Beta Was this translation helpful? Give feedback.
-
|
Hello everyone. I introduce my axum-connect plugin for protoc. Let's check out here https://github.com/yaroher/protoc-gen-axum-connect. Welcome to report issues and and give stars) |
Beta Was this translation helpful? Give feedback.
-
|
I have tested connectrpc-axum, confirmed support for pure Connect (proto), and successfully migrated an existing Go Connect service to it |
Beta Was this translation helpful? Give feedback.
-
|
I didn't post the repo here earlier because it is still in early stages: connectrpc-axum. In the Rust ecosystem, web frameworks generally follow two styles: Axum-style, based on the implementation, we got:
Go-idiomatic style: tonic I chose the Axum api style and similar implementation for this crate. This allows you to leverage the full Axum ecosystem, enabling a gradual migration from a standard Axum HTTP app to a hybrid HTTP and Connect app. Compare to axum-connect, my goal was to maintain native compatibility with the existing Axum ecosystem.
The repo currently relies on prost, axum, and tonic. As a next step, maybe moving to the official protoc rust generator. |
Beta Was this translation helpful? Give feedback.
-
|
For anyone else curious about how https://github.com/washanhanzi/connectrpc-axum stacks up against https://github.com/AThilenius/axum-connect, I let Opus wild on a review run, this is what it came up with Deep Comparison: connectrpc-axum vs axum-connect
Feature Comparison
Why the 10x Size Difference?
Code Quality Comparison // Extensive error handling with fallback responses
pub(crate) fn internal_error_response(content_type: &'static str) -> Response
pub(crate) fn internal_error_end_stream_frame() -> Vec<u8>
// Full protocol detection
pub enum RequestProtocol {
ConnectUnaryJson,
ConnectUnaryProto,
ConnectStreamJson,
ConnectStreamProto,
Unknown,
}// Middleware layer stack with proper Tower integration axum-connect: // Clean but minimal - many TODOs
// From handler_unary.rs:28-33
// TODO: protocol version validation
// TODO: timeout handling
// TODO: metadata parsing
// From lib.rs - acknowledged hack
// TODO: This is a nasty hack. Get rid of it.
let files = Rc::new(RefCell::new(vec![]));API Ergonomics axum-connect: let app = Router::new()
.rpc(HelloWorldService::say_hello(say_hello_handler))
.rpc(HelloWorldService::say_hello_stream(stream_handler));connectrpc-axum: let router = HelloWorldServiceBuilder::new()
.say_hello(say_hello)
.build_connect(); // or .build_tonic() for gRPC supportMy Assessment
Recommendation
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Would you or your company use a Connect implementation in Rust? If yes, please leave a comment and tell us more about what you'd like (especially if you need integration with a particular framework).
316 votes ·
Beta Was this translation helpful? Give feedback.
All reactions