25 lines
690 B
Rust
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
|