2018-05-14 00:31:48 -04:00
|
|
|
syntax = "proto3";
|
|
|
|
package main;
|
|
|
|
|
|
|
|
message Msg {
|
|
|
|
enum MsgKind {
|
2018-05-14 13:02:47 -04:00
|
|
|
START = 0;
|
2018-05-14 02:50:55 -04:00
|
|
|
READ_FILE_SYNC = 1;
|
|
|
|
DATA_RESPONSE = 2;
|
2018-05-14 17:27:34 -04:00
|
|
|
EXIT = 3;
|
2018-05-15 04:39:03 -04:00
|
|
|
COMPILE_OUTPUT = 4;
|
2018-05-14 00:31:48 -04:00
|
|
|
}
|
|
|
|
MsgKind kind = 10;
|
|
|
|
|
2018-05-15 04:39:03 -04:00
|
|
|
oneof payload {
|
|
|
|
StartMsg start = 90;
|
|
|
|
CompileOutputMsg compile_output = 100;
|
|
|
|
}
|
2018-05-14 02:50:55 -04:00
|
|
|
|
2018-05-15 04:39:03 -04:00
|
|
|
// READ_FILE_SYNC and MKDIRP
|
2018-05-14 21:47:39 -04:00
|
|
|
string path = 20;
|
2018-05-14 02:50:55 -04:00
|
|
|
|
|
|
|
// DATA_RESPONSE
|
2018-05-14 21:47:39 -04:00
|
|
|
bytes data = 30;
|
2018-05-14 13:02:47 -04:00
|
|
|
string error = 31;
|
2018-05-14 17:27:34 -04:00
|
|
|
|
|
|
|
// EXIT
|
|
|
|
int32 code = 40;
|
2018-05-14 00:31:48 -04:00
|
|
|
}
|
2018-05-15 04:39:03 -04:00
|
|
|
|
|
|
|
// START
|
|
|
|
message StartMsg {
|
|
|
|
string cwd = 1;
|
|
|
|
repeated string argv = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
// WRITE_COMPILE_OUTPUT
|
|
|
|
message CompileOutputMsg {
|
|
|
|
string source = 1;
|
|
|
|
string filename = 2;
|
|
|
|
}
|