Skip to content

Adding or Extending Clients in Rust code? #400

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
DTrippe opened this issue May 26, 2023 · 2 comments
Closed

Adding or Extending Clients in Rust code? #400

DTrippe opened this issue May 26, 2023 · 2 comments

Comments

@DTrippe
Copy link

DTrippe commented May 26, 2023

Similar question to #261:

Is it possible to extend a client with one that's already been compiled? For example, if I have some package "B" that depends on "A", and in "B" there is a Common interface. If I wanted to create a Service interface for package "A" that also has the functionality of the Common interface, is there any way of doing so with only access to the generated code from "B" (not the .capnp definitions)?

In this scenario, there is no shared logic between those interfaces (as in, either could function independently of the other).

@dwrensha
Copy link
Member

See #233. At schema-compilation time, capnp compile needs to be able to find the .capnp files of all types being referenced. So you are going to need to give it access to the .capnp files from package B.

@DTrippe
Copy link
Author

DTrippe commented May 30, 2023

Makes sense, thank you for the reply.

@DTrippe DTrippe closed this as completed May 30, 2023
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

No branches or pull requests

2 participants