Lines Matching refs:code
7 - Generate server and client code.
32 To run the sample code and walk through the tutorial, the only prerequisite is Rust itself.
87 different [code generation configuration](#tonic-build) later in the tutorial.
164 ## Generating client and server code
166 Tonic can be configured to generate code as part cargo's normal build process. This is very
167 convenient because once we've set everything up, there is no extra step to keep the generated code
170 Behind the scenes, Tonic uses [PROST!] to handle protocol buffer serialization and code
204 That's it. The generated code contains:
241 The generated code is placed inside our target directory, in a location defined by the `OUT_DIR`
243 code in a path similar to `target/debug/build/routeguide/out/routeguide.rs`.
247 We can use Tonic's `include_proto` macro to bring the generated code into scope:
569 complete example client code in [examples/src/routeguide/client.rs][routeguide-client].
592 case, we'll start by bringing the generated code into scope:
611 Same as in the server implementation, we start by bringing our generated code into scope. We then
795 Tonic's default code generation configuration is convenient for self contained examples and small
800 - When we want editor support for the generate code and our editor does not index the generated
804 code for different crates or different languages, the default configuration is not enough.
809 1) We can keep our `.proto` definitions in a separate crate and generate our code on demand, as
824 On `cargo run`, this will generate code for the server only, and place the resulting file in