We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f1717d7 commit 58977b7Copy full SHA for 58977b7
capnp-rpc/README.md
@@ -39,12 +39,18 @@ fn main() {
39
}
40
```
41
42
-and you can include the generated code in your project like this:
+Such a command generates a `foo_capnp.rs` file in the `OUT_DIR`
43
+directory provided by `cargo`.
44
+
45
+To import the generated code, add a line like this at the root of your crate:
46
47
```rust
48
capnp::generated_code!(pub mod foo_capnp);
49
50
51
+(If you want to import the code at a non-toplevel module location, then you will
52
+need to use the `$Rust.parentModule` annotation, defined in `rust.capnp`.)
53
54
## Calling methods on an RPC object
55
56
For each defined interface, the generated code includes a `Client` struct
0 commit comments