mirror of
https://github.com/zellij-org/zellij.git
synced 2024-11-26 10:55:12 +03:00
1bedfc9002
* work * almost done with command protobuffers * done translating command data structures * mid transferring of every command to protobuff command * transferred plugin_command.rs, now moving on to shim.rs * plugin command working with protobufs * protobuffers in update * protobuf event tests * various TODOs and comments * fix zellij-tile * clean up prost deps * remove version mismatch error * fix panic * some cleanups * clean up event protobuffers * clean up command protobuffers * clean up various protobufs * refactor protobufs * update comments * some transformation fixes * use protobufs for workers * style(fmt): rustfmt * style(fmt): rustfmt * chore(build): add protoc * chore(build): authenticate protoc
22 lines
648 B
Rust
22 lines
648 B
Rust
use prost_build;
|
|
use std::fs;
|
|
|
|
fn main() {
|
|
let mut prost_build = prost_build::Config::new();
|
|
prost_build.include_file("generated_plugin_api.rs");
|
|
let mut proto_files = vec![];
|
|
for entry in fs::read_dir("src/plugin_api").unwrap() {
|
|
let entry_path = entry.unwrap().path();
|
|
if entry_path.is_file() {
|
|
if let Some(extension) = entry_path.extension() {
|
|
if extension == "proto" {
|
|
proto_files.push(entry_path.display().to_string())
|
|
}
|
|
}
|
|
}
|
|
}
|
|
prost_build
|
|
.compile_protos(&proto_files, &["src/plugin_api"])
|
|
.unwrap();
|
|
}
|