Skip to content

Commit fb8da3c

Browse files
committed
Added Compile rpc command
1 parent 875ec10 commit fb8da3c

File tree

3 files changed

+33
-0
lines changed

3 files changed

+33
-0
lines changed

rpc/commands.proto

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ option go_package = "github.com/arduino/arduino-cli/rpc";
66

77
import "common.proto";
88
import "board.proto";
9+
import "compile.proto";
910

1011
// The main Arduino Platform Service
1112
service ArduinoCore {
@@ -23,6 +24,8 @@ service ArduinoCore {
2324

2425
// Requests details about a board
2526
rpc BoardDetails(BoardDetailsReq) returns (BoardDetailsResp);
27+
28+
rpc Compile(CompileReq) returns (CompileResp);
2629
}
2730

2831
// Configuration contains information to instantiate an Arduino Platform Service

rpc/compile.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
package rpc
2+
3+
//go:generate protoc -I . -I .. --go_out=plugins=grpc:../../../.. compile.proto

rpc/compile.proto

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
syntax = "proto3";
2+
3+
package arduino;
4+
5+
option go_package = "github.com/arduino/arduino-cli/rpc";
6+
7+
import "common.proto";
8+
9+
message CompileReq {
10+
Instance instance = 1;
11+
string fqbn = 2; // Fully Qualified Board Name, e.g.: arduino:avr:uno.
12+
string sketchPath = 3;
13+
bool showProperties = 4; // Show all build preferences used instead of compiling.
14+
bool preprocess = 5; // Print preprocessed code to stdout.
15+
string buildCachePath = 6; // Builds of 'core.a' are saved into this path to be cached and reused.
16+
string buildPath = 7; // Path where to save compiled files.
17+
repeated string buildProperties = 8; // List of custom build properties separated by commas. Or can be used multiple times for multiple properties.
18+
string warnings = 9; // Used to tell gcc which warning level to use.
19+
bool verbose = 10; // Turns on verbose mode.
20+
bool quiet = 11; // Suppresses almost every output.
21+
string vidPid = 12; // VID/PID specific build properties.
22+
string exportFile = 13; // The compiled binary is written to this file
23+
}
24+
25+
message CompileResp {
26+
Result result = 1;
27+
}

0 commit comments

Comments
 (0)