Files
tprais2/protos/build.rs
Filipriec a3eb797be0 working
2026-04-21 16:27:20 +02:00

25 lines
690 B
Rust

// // 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