build: Add "io" module for BLE/ UART messages
This commit is contained in:
parent
29a5d86e43
commit
21db09ad7f
6 changed files with 193 additions and 4 deletions
12
build.rs
12
build.rs
|
|
@ -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() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue