2018-05-14 00:31:48 -04:00
|
|
|
syntax = "proto3";
|
|
|
|
package main;
|
|
|
|
|
|
|
|
message Msg {
|
2018-05-17 21:02:06 -04:00
|
|
|
string error = 1;
|
2018-05-15 04:39:03 -04:00
|
|
|
oneof payload {
|
2018-05-17 21:02:06 -04:00
|
|
|
StartMsg start = 10;
|
|
|
|
SourceCodeFetchMsg source_code_fetch = 11;
|
|
|
|
SourceCodeFetchResMsg source_code_fetch_res = 12;
|
|
|
|
SourceCodeCacheMsg source_code_cache = 13;
|
|
|
|
ExitMsg exit = 14;
|
2018-05-18 11:49:28 -04:00
|
|
|
TimerStartMsg timer_start = 15;
|
|
|
|
TimerReadyMsg timer_ready = 16;
|
2018-05-15 04:39:03 -04:00
|
|
|
}
|
2018-05-14 00:31:48 -04:00
|
|
|
}
|
2018-05-15 04:39:03 -04:00
|
|
|
|
|
|
|
message StartMsg {
|
|
|
|
string cwd = 1;
|
|
|
|
repeated string argv = 2;
|
2018-05-19 05:38:51 -04:00
|
|
|
bool debug_flag = 3;
|
2018-05-15 04:39:03 -04:00
|
|
|
}
|
|
|
|
|
2018-05-19 04:47:40 -04:00
|
|
|
message SourceCodeFetchMsg {
|
|
|
|
string module_specifier = 1;
|
|
|
|
string containing_file = 2;
|
|
|
|
}
|
2018-05-17 09:47:09 -04:00
|
|
|
|
|
|
|
message SourceCodeFetchResMsg {
|
2018-05-19 04:47:40 -04:00
|
|
|
// If it's a non-http module, moduleName and filename will be the same.
|
|
|
|
// For http modules, moduleName is its resolved http URL, and filename
|
|
|
|
// is the location of the locally downloaded source code.
|
|
|
|
string moduleName = 1;
|
|
|
|
string filename = 2;
|
|
|
|
string source_code = 3;
|
|
|
|
string output_code = 4; // Non-empty only if cached.
|
2018-05-17 09:47:09 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
message SourceCodeCacheMsg {
|
|
|
|
string filename = 1;
|
|
|
|
string source_code = 2;
|
|
|
|
string output_code = 3;
|
2018-05-15 04:39:03 -04:00
|
|
|
}
|
2018-05-17 21:02:06 -04:00
|
|
|
|
|
|
|
message ExitMsg { int32 code = 1; }
|
2018-05-18 11:49:28 -04:00
|
|
|
|
|
|
|
message TimerStartMsg {
|
|
|
|
int32 id = 1;
|
|
|
|
bool interval = 2;
|
|
|
|
int32 duration = 3; // In milliseconds.
|
|
|
|
}
|
|
|
|
|
|
|
|
message TimerReadyMsg {
|
|
|
|
int32 id = 1;
|
|
|
|
bool done = 2;
|
|
|
|
}
|