flatbuffers icon indicating copy to clipboard operation
flatbuffers copied to clipboard

Tracking issue: Rust gRPC

Open ian-p-cooke opened this issue 5 years ago • 17 comments

built from master:

>~/src/flatbuffers/grpc/samples/greeter$ ../../../build/flatc --grpc --rust greeter.fbs
../../../build/flatc: warning: GRPC interface generator not implemented for Rust

I know Rust support is new so I wasn't expecting this right away but it would be cool. I use grpc-rs so I was looking for support for that crate but others use grpc-rust.

ian-p-cooke avatar Sep 05 '18 10:09 ian-p-cooke

What is involved in implementing this?

rw avatar Sep 05 '18 20:09 rw

Would be worth looking at past gRPC / FlatBuffers language PRs, but it seems that every language is supported a bit differently in gRPC, so hard to say.

aardappel avatar Sep 20 '18 21:09 aardappel

This issue has been automatically marked as stale because it has not had activity for 1 year. It will be automatically closed if no further activity occurs. To keep it open, simply post a new comment. Maintainers will re-open on new activity. Thank you for your contributions.

stale[bot] avatar Sep 21 '19 04:09 stale[bot]

I found the grpc support has only c++ implementation, is this not suit for rpc?

ufosky avatar Feb 10 '20 04:02 ufosky

gRPC in a few languages supports FlatBuffers. Doing it for Rust is just a matter of creating a good design and implementing that. Any takers? :-]

rw avatar Feb 10 '20 05:02 rw

I'm very interested in working on this -- would it be frowned upon to generate client and server stubs which are somewhat tied to an existing library and intended for use with its facilities? I really like of the modularity and performance that https://docs.rs/tonic/0.3.1/tonic/index.html[Tonic]

provides, as it builds on the tokio, bytes (all the better to make use of flatbuffers' zero-copy functionality!) and tower ecosystems, but I recognize that the dependencies it pulls in might be off-putting to some. Tonic's Codec trait is pretty flexible and seems well-suited for use with flatbuffers, so that gets my vote, but if the maintainers have a strong preference for one or the other I am happy to work on either implementation

mcaveniathor avatar Oct 20 '20 09:10 mcaveniathor

Imo, having some support is better than none, so we might as well start there. I expect the ecosystem to continue evolving and we'd need to adapt to those changes, so try not to tie everything to that particular stack too tightly

CasperN avatar Oct 20 '20 15:10 CasperN

note that i now use tonic as well, so i'm fine with supporting only that stack. once that's working i imagine you could look at grpc-rs, etc.

ian-p-cooke avatar Oct 20 '20 15:10 ian-p-cooke

This issue is stale because it has been open 6 months with no activity. Please comment or this will be closed in 14 days.

github-actions[bot] avatar Apr 20 '21 20:04 github-actions[bot]

bump, this is still cool

CasperN avatar Apr 23 '21 20:04 CasperN

I would be interested in contributing. anyone else willing to collaborate on the design plan? To get an idea, would this involve utilizing rust packages such as grpc-rs? or would this be too high-level and something based on mio is wished?

katetsu avatar Aug 20 '21 11:08 katetsu

I haven't worked with those libraries but my heuristic is that we should do whatever works for more users. I think this will mean using grpc-rs. Now, if we could implement something on mio that also led to grpc-rs support for free (or cheap), that would be even better

CasperN avatar Aug 20 '21 18:08 CasperN

Just FYI, I built a crate that integrates flatbuffers code-generation to cargo build process, so it is more convenient to use flatbuffers to develop applications: https://github.com/frol/flatc-rust. I'm not sure if it is of any use in this discussion, but I just wanted to mention it

frol avatar Aug 21 '21 06:08 frol

Checking in on this; happy to help implement a rust generator for the compiler, seems like there are enough implementations to compare against. Let me know if anyone has already started on this or if anyone would like to sync up and get something implemented. Will try to put this on my road map for Q1 2022.

Ryanmtate avatar Nov 21 '21 03:11 Ryanmtate

@Ryanmtate yes please do! I'll be happy to help with code review!

CasperN avatar Nov 22 '21 17:11 CasperN

@Ryanmtate Are you still interesting in doing this?

dbaileychess avatar Mar 31 '22 00:03 dbaileychess

Yes, I am still interested. A bit busy at the moment, but this would be a nice have for a work project I am working on.

I'll need to revisit in a month or so when I am have more time.

Ryanmtate avatar Mar 31 '22 00:03 Ryanmtate

This issue is stale because it has been open 6 months with no activity. Please comment or label not-stale, or this will be closed in 14 days.

github-actions[bot] avatar Mar 04 '23 01:03 github-actions[bot]

This issue was automatically closed due to no activity for 6 months plus the 14 day notice period.

github-actions[bot] avatar Mar 18 '23 20:03 github-actions[bot]