0
0
Fork 0

build: Add "io" module for BLE/ UART messages

This commit is contained in:
Jannik Beyerstedt 2026-07-22 15:30:47 +02:00
commit 21db09ad7f
6 changed files with 193 additions and 4 deletions

View file

@ -1,6 +1,6 @@
use std::env;
fn main() {
fn main() -> std::io::Result<()> {
let target_arch = env::var("CARGO_CFG_TARGET_ARCH").unwrap();
if target_arch == "riscv32" {
@ -8,6 +8,16 @@ fn main() {
// make sure linkall.x is the last linker script (otherwise might cause problems with flip-link)
println!("cargo:rustc-link-arg=-Tlinkall.x");
}
let descriptor_path =
std::path::PathBuf::from(env::var("OUT_DIR").unwrap()).join("proto_descriptor.bin");
prost_build::Config::new()
.file_descriptor_set_path(&descriptor_path)
.compile_well_known_types()
.compile_protos(&["docs/c_its-messages.proto"], &["docs/"])?;
Ok(())
}
fn linker_be_nice() {