Skip to content

feat: nested services#53

Draft
Frando wants to merge 2 commits into
mainfrom
Frando/nest-services
Draft

feat: nested services#53
Frando wants to merge 2 commits into
mainfrom
Frando/nest-services

Conversation

@Frando

@Frando Frando commented Jul 25, 2025

Copy link
Copy Markdown
Member

(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

rklaehn commented Jul 28, 2025

Copy link
Copy Markdown
Collaborator

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

Frando commented Jul 28, 2025

Copy link
Copy Markdown
Member Author

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