Skip to content

Conversation

Frando
Copy link
Member

@Frando Frando commented Jul 25, 2025

(draft)

Adds Client::map and MappedClient to easily perform requests on embedded (nested) services.
This allows composing services within a single protocol / connection.

Also adds a nested argument to the rpc macro to allow doing this via the macro. If nested is set, no WithChannels conversions are created, instead the message contains the message specified via the nested argument.

See the nested example.

@rklaehn
Copy link
Collaborator

rklaehn commented Jul 28, 2025

Not sure if this is the right way to go. It adds quite a bit of complexity. Ideally you would be able to mash together lots of different services on a single endpoint if the enum discriminator was not just a varint but something that actually describes the request semantically.

I would rather follow the latter approach, which is what I prototyped in https://crates.io/crates/irpc-schema .

@Frando
Copy link
Member Author

Frando commented Jul 28, 2025

Yeah, let's leave it as a draft for a bit, I also wanna play with irpc-schema more before committing to this approach.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants