|
21 | 21 | to depend on gRPC Swift. |
22 | 22 |
|
23 | 23 | As a prerequisite you must have the Protocol Buffers compiler (`protoc`) installed. You can |
24 | | - find the instructions for doing this in the [gRPC Swift Protobuf |
| 24 | + find the instructions for doing this in the [gRPC Swift Protobuf |
25 | 25 | documentation](https://swiftpackageindex.com/grpc/grpc-swift-protobuf/documentation/grpcprotobuf/installing-protoc). |
26 | 26 | The remainder of this tutorial assumes you installed `protoc` and it's available in |
27 | 27 | your `$PATH`. |
28 | 28 |
|
| 29 | + You may notices that the `swift` commands are all prefixed with `PROTOC_PATH=$(which protoc)`, |
| 30 | + this is to let the build system know where `protoc` is located so that it can generate stubs |
| 31 | + for you. You can read more about it in the [gRPC Swift Protobuf |
| 32 | + documentation](https://swiftpackageindex.com/grpc/grpc-swift-protobuf/documentation/grpcprotobuf/generating-stubs). |
| 33 | + |
29 | 34 | @Steps { |
30 | 35 | @Step { |
31 | 36 | Create a new directory called for the package called `RouteGuide`. |
|
126 | 131 | called `route_guide.proto`. We'll use the "proto3" syntax and our service will be part of |
127 | 132 | the "routeguide" package. |
128 | 133 |
|
129 | | - It's good practice to organise your `.proto` files according to the package they are |
| 134 | + It's good practice to organize your `.proto` files according to the package they are |
130 | 135 | declared in, that's why we created the `routeguide` directory to match the "routeguide" |
131 | 136 | package name. |
132 | 137 |
|
|
475 | 480 |
|
476 | 481 | @Steps { |
477 | 482 | @Step { |
478 | | - In one terminal run `swift run RouteGuide --server` to start the server. |
| 483 | + In one terminal run `PROTOC_PATH=$(which protoc) swift run RouteGuide --server` to start the server. |
479 | 484 |
|
480 | 485 | @Code(name: "Console", file: "route-guide-sec07-step01-server.txt") |
481 | 486 | } |
482 | 487 |
|
483 | 488 | @Step { |
484 | | - In another terminal run `swift run RouteGuide` to run the client program. |
| 489 | + In another terminal run `PROTOC_PATH=$(which protoc) swift run RouteGuide` to run the client program. |
485 | 490 |
|
486 | 491 | @Code(name: "Console", file: "route-guide-sec07-step02-client.txt") |
487 | 492 | } |
|
0 commit comments