138 | 138 | For more information on Arduino CLI's command line interface, see the [command reference].
| 139 | 139 |
|
140 | 140 | ## The second pillar: gRPC interface
|
141 | 141 |
|
142 | 142 | [gRPC] is a high performance [RPC] framework that can efficiently connect client and server applications. The Arduino
|
143 |
| -CLI can act as a gRPC server (we call it [daemon mode]), exposing a set of procedures that implement the very same set |
144 |
| -of features of the command line interface and waiting for clients to connect and use them. To give an idea, the |
145 |
| -following is some [Golang] code capable of retrieving the version number of a remote running Arduino CLI server |
146 |
| -instance: |
| 143 | +CLI can act as a gRPC server (we call it [daemon mode]), exposing a set of procedures that implement the very same set of |
| 144 | +features of the command line interface and waiting for clients to connect and use them. To give an idea, the following is |
| 145 | +some [Golang] code capable of retrieving the version number of a remote running Arduino CLI server instance: |
147 | 146 |
|
148 | 147 | ```go
|
149 | 148 | // This file is part of arduino-cli.
|
@@ -211,8 +210,8 @@ a common Golang API, based on the gRPC protobuf definitions: a set of functions
|
211 | 210 | offered by the Arduino CLI, so that when we provide a fix or a new feature, they are automatically available to both the
|
212 | 211 | command line and gRPC interfaces. The source modules implementing this API are implemented through the `commands`
|
213 | 212 | package, and it can be imported in other Golang programs to embed a full-fledged Arduino CLI. For example, this is how
|
214 |
| -some backend services powering [Arduino Cloud] can compile sketches and manage libraries. Just to give you a taste of |
215 |
| -what it means to embed the Arduino CLI, here is how to search for a core using the API: |
| 213 | +some backend services powering [Arduino Cloud] can compile sketches and manage libraries. Just to give you a taste of what |
| 214 | +it means to embed the Arduino CLI, here is how to search for a core using the API: |
216 | 215 |
|
217 | 216 | ```go
|
218 | 217 | // This file is part of arduino-cli.
|
@@ -297,7 +296,8 @@ use and provide support for.
|
297 | 296 | You can start playing with the Arduino CLI right away. The code is open source and [the repo][arduino cli repository]
|
298 | 297 | contains [example code showing how to implement a gRPC client][grpc client example]. If you’re curious about how we
|
299 | 298 | designed the low level API, have a look at the [commands package] and don’t hesitate to leave feedback on the [issue
|
300 |
| -tracker] if you’ve got a use case that doesn’t fit one of the three pillars. |
| 299 | +tracker] |
| 300 | +if you’ve got a use case that doesn’t fit one of the three pillars. |
301 | 301 |
|
302 | 302 | [golang]: https://go.dev/
|
303 | 303 | [arduino ide 2.x]: https://github.com/arduino/arduino-ide
|
|
0 commit comments