utrace 0.1.1

Instrumentation-based profiling library for embedded targets with async support
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
use std::{env, error::Error, fs, path::PathBuf};

fn main() -> Result<(), Box<dyn Error>> {
    let linker_script = fs::read_to_string("utrace_linker.x.in")?;

    let out = &PathBuf::from(env::var("OUT_DIR")?);
    fs::write(out.join("utrace_linker.x"), linker_script)?;

    println!("cargo:rustc-link-search={}", out.display());

    Ok(())
}