This commit is contained in:
Filipriec
2026-04-21 16:27:20 +02:00
parent b752af8c7b
commit a3eb797be0
6 changed files with 677 additions and 4 deletions

24
protos/build.rs Normal file
View File

@@ -0,0 +1,24 @@
// // build.rs
// use micropb_gen::{Generator, Config};
// let mut generator = Generator::new();
// generator.use_container_heapless().configure(".example.Example", Config::new().type_attributes("#[derive(Clone)]"));
// generator.compile_protos(&["transport.proto"], std::env::var("OUT_DIR").unwrap() + "/example.rs").unwrap();
// build.rs
use micropb_gen::{Config, Generator};
fn main() {
// <--- YOU MUST ADD THIS
let mut generator = Generator::new();
generator.use_container_heapless();
generator
.compile_protos(
&["transport.proto"],
std::env::var("OUT_DIR").unwrap() + "/nieco.rs",
)
.unwrap();
} // <--- AND THIS