Skip to content

Commit 685dfaa

Browse files
authored
[skip changelog] Add documentation for compilation components of the gRPC interface (#695)
Comments added to the .proto files are included in the generated gRPC interface documentation.
1 parent ebc28e1 commit 685dfaa

File tree

3 files changed

+17
-14
lines changed

3 files changed

+17
-14
lines changed

Diff for: rpc/commands/commands.pb.go

+2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: rpc/commands/commands.proto

+1
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ service ArduinoCore {
6565
// List all the boards provided by installed platforms.
6666
rpc BoardListAll(BoardListAllReq) returns (BoardListAllResp);
6767

68+
// Compile an Arduino sketch.
6869
rpc Compile(CompileReq) returns (stream CompileResp);
6970

7071
// Download and install a platform and its tool dependencies.

Diff for: rpc/commands/compile.proto

+14-14
Original file line numberDiff line numberDiff line change
@@ -22,27 +22,27 @@ option go_package = "github.com/arduino/arduino-cli/rpc/commands";
2222
import "commands/common.proto";
2323

2424
message CompileReq {
25-
Instance instance = 1;
26-
string fqbn = 2; // Fully Qualified Board Name, e.g.: arduino:avr:uno.
27-
string sketchPath = 3;
25+
Instance instance = 1; // Arduino Core Service instance from the `Init` response.
26+
string fqbn = 2; // Fully Qualified Board Name, e.g.: `arduino:avr:uno`. If this field is not defined, the FQBN of the board attached to the sketch via the `BoardAttach` method is used.
27+
string sketchPath = 3; // The path where the sketch is stored.
2828
bool showProperties = 4; // Show all build preferences used instead of compiling.
29-
bool preprocess = 5; // Print preprocessed code to stdout.
29+
bool preprocess = 5; // Print preprocessed code to stdout instead of compiling.
3030
string buildCachePath = 6; // Builds of 'core.a' are saved into this path to be cached and reused.
31-
string buildPath = 7; // Path where to save compiled files.
32-
repeated string buildProperties = 8; // List of custom build properties separated by commas. Or can be used multiple times for multiple properties.
33-
string warnings = 9; // Used to tell gcc which warning level to use.
31+
string buildPath = 7; // Path to use to store the files used for the compilation. If omitted, a directory will be created in the operating system's default temporary path.
32+
repeated string buildProperties = 8; // List of custom build properties separated by commas.
33+
string warnings = 9; // Used to tell gcc which warning level to use. The level names are: "none", "default", "more" and "all".
3434
bool verbose = 10; // Turns on verbose mode.
3535
bool quiet = 11; // Suppresses almost every output.
3636
string vidPid = 12; // VID/PID specific build properties.
3737
string exportFile = 13 [deprecated = true]; // DEPRECATED: use exportDir instead
38-
int32 jobs = 14; // The max number of concurrent compiler instances to run (as make -jx)
39-
repeated string libraries = 15; // List of custom libraries paths separated by commas. Or can be used multiple times for multiple libraries paths.
40-
bool optimizeForDebug = 16; // Optimize compile output for debug, not for release
41-
bool dryRun = 17; // When set to true the compiled binary will not be copied to the export directory
42-
string export_dir = 18; // Optional: save the build artifacts in this directory, the directory must exist
38+
int32 jobs = 14; // The max number of concurrent compiler instances to run (as `make -jx`). If jobs is set to 0, it will use the number of available CPUs as the maximum.
39+
repeated string libraries = 15; // List of custom libraries paths separated by commas.
40+
bool optimizeForDebug = 16; // Optimize compile output for debug, not for release.
41+
bool dryRun = 17; // When set to `true` the compiled binary will not be copied to the export directory.
42+
string export_dir = 18; // Optional: save the build artifacts in this directory, the directory must exist.
4343
}
4444

4545
message CompileResp {
46-
bytes out_stream = 1;
47-
bytes err_stream = 2;
46+
bytes out_stream = 1; // The output of the compilation process.
47+
bytes err_stream = 2; // The error output of the compilation process.
4848
}

0 commit comments

Comments
 (0)