bela 0.4.0

Safe Rust API for real-time audio on Bela Gem
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//! Emits the `bela_device` cfg for device targets.

use std::env;

// The parts of the crate that call into libbela can only link on the board.
// Gate them behind a custom `bela_device` cfg so that host builds (unit
// tests, clippy) and non-linking cross checks stay warning-free.
fn main() {
    println!("cargo::rustc-check-cfg=cfg(bela_device)");
    let arch = env::var("CARGO_CFG_TARGET_ARCH").unwrap_or_default();
    let os = env::var("CARGO_CFG_TARGET_OS").unwrap_or_default();
    if arch == "aarch64" && os == "linux" {
        println!("cargo::rustc-cfg=bela_device");
    }
}